mirror of
https://github.com/house-of-vanity/sum_counter.git
synced 2025-08-21 15:57:19 +00:00
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
// This provides the frozen (compiled bytecode) files that are included if
|
|
// any.
|
|
#include <Python.h>
|
|
|
|
#include "nuitka/constants_blob.h"
|
|
|
|
// Blob from which modules are unstreamed.
|
|
#define stream_data constant_bin
|
|
|
|
// These modules should be loaded as bytecode. They may e.g. have to be loadable
|
|
// during "Py_Initialize" already, or for irrelevance, they are only included
|
|
// in this un-optimized form. These are not compiled by Nuitka, and therefore
|
|
// are not accelerated at all, merely bundled with the binary or module, so
|
|
// that CPython library can start out finding them.
|
|
|
|
struct frozen_desc {
|
|
char const *name;
|
|
ssize_t start;
|
|
int size;
|
|
};
|
|
|
|
void copyFrozenModulesTo( struct _frozen *destination )
|
|
{
|
|
struct frozen_desc frozen_modules[] = {
|
|
|
|
{ NULL, 0, 0 }
|
|
};
|
|
|
|
struct frozen_desc *current = frozen_modules;
|
|
|
|
for(;;)
|
|
{
|
|
destination->name = (char *)current->name;
|
|
destination->code = (unsigned char *)&constant_bin[ current->start ];
|
|
destination->size = current->size;
|
|
|
|
if (destination->name == NULL) break;
|
|
|
|
current += 1;
|
|
destination += 1;
|
|
};
|
|
}
|