#ifndef Py_LIMITED_API
struct _frozen {
- char *name; /* ASCII encoded string */
- unsigned char *code;
+ const char *name; /* ASCII encoded string */
+ const unsigned char *code;
int size;
};
/* Embedding apps may change this pointer to point to their favorite
collection of frozen modules: */
-PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;
+PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;
#endif
#ifdef __cplusplus
of frozen modules instead, left deliberately blank so as to avoid
unintentional import of a stale version of _frozen_importlib. */
-static struct _frozen _PyImport_FrozenModules[] = {
+const static struct _frozen _PyImport_FrozenModules[] = {
{0, 0, 0} /* sentinel */
};
/* On Windows, this links with the regular pythonXY.dll, so this variable comes
from frozen.obj. In the Makefile, frozen.o is not linked into this executable,
so we define the variable here. */
-struct _frozen *PyImport_FrozenModules;
+const struct _frozen *PyImport_FrozenModules;
#endif
const char header[] = "/* Auto-generated by Modules/_freeze_importlib.c */";
return 1;
}
fprintf(outfile, "%s\n", header);
- fprintf(outfile, "unsigned char _Py_M__importlib[] = {\n");
+ fprintf(outfile, "const unsigned char _Py_M__importlib[] = {\n");
for (n = 0; n < data_size; n += 16) {
size_t i, end = Py_MIN(n + 16, data_size);
fprintf(outfile, " ");
#define SIZE (int)sizeof(M___hello__)
-static struct _frozen _PyImport_FrozenModules[] = {
+static const struct _frozen _PyImport_FrozenModules[] = {
/* importlib */
{"_frozen_importlib", _Py_M__importlib, (int)sizeof(_Py_M__importlib)},
/* Test module */
/* Embedding apps may change this pointer to point to their favorite
collection of frozen modules: */
-struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;
+const struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;
/* Auto-generated by Modules/_freeze_importlib.c */
-unsigned char _Py_M__importlib[] = {
+const unsigned char _Py_M__importlib[] = {
99,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,
0,64,0,0,0,115,229,3,0,0,100,0,0,90,0,0,
100,130,0,90,1,0,100,4,0,100,5,0,132,0,0,90,