Files
sum_counter/sum.build/__frozen.c

43 lines
1.1 KiB
C
Raw Normal View History

2019-09-12 00:03:58 +03:00
// 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;
};
}