mirror of
https://github.com/house-of-vanity/sum_counter.git
synced 2025-08-22 00:07:16 +00:00
Free basic version
This commit is contained in:
42
sum.build/__frozen.c
Normal file
42
sum.build/__frozen.c
Normal file
@@ -0,0 +1,42 @@
|
||||
// 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;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user