make some freezing related stuff const

This commit is contained in:
Benjamin Peterson 2013-03-13 14:06:39 -05:00
parent 327992330e
commit 7701e6ef93
4 changed files with 9 additions and 9 deletions

View file

@ -17,7 +17,7 @@
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 */
};
@ -25,7 +25,7 @@ static struct _frozen _PyImport_FrozenModules[] = {
/* 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 */";
@ -105,7 +105,7 @@ main(int argc, char *argv[])
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, " ");