diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-03-13 19:06:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-03-13 19:06:39 (GMT) |
commit | 7701e6ef93be47b6d9646321ff95530653097d68 (patch) | |
tree | ff3b21ece3419a59035ce91526f022a4c45b915c /Modules | |
parent | 327992330e13cd6663faa8400f9ff46daab828b0 (diff) | |
download | cpython-7701e6ef93be47b6d9646321ff95530653097d68.zip cpython-7701e6ef93be47b6d9646321ff95530653097d68.tar.gz cpython-7701e6ef93be47b6d9646321ff95530653097d68.tar.bz2 |
make some freezing related stuff const
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_freeze_importlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_freeze_importlib.c b/Modules/_freeze_importlib.c index 65b29e1..0435a8a 100644 --- a/Modules/_freeze_importlib.c +++ b/Modules/_freeze_importlib.c @@ -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, " "); |