Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7701e6ef
Commit
7701e6ef
authored
Mar 13, 2013
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make some freezing related stuff const
parent
32799233
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
Include/import.h
Include/import.h
+3
-3
Modules/_freeze_importlib.c
Modules/_freeze_importlib.c
+3
-3
Python/frozen.c
Python/frozen.c
+2
-2
Python/importlib.h
Python/importlib.h
+1
-1
No files found.
Include/import.h
View file @
7701e6ef
...
...
@@ -113,15 +113,15 @@ PyAPI_FUNC(int) PyImport_AppendInittab(
#ifndef Py_LIMITED_API
struct
_frozen
{
char
*
name
;
/* ASCII encoded string */
unsigned
char
*
code
;
c
onst
c
har
*
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
...
...
Modules/_freeze_importlib.c
View file @
7701e6ef
...
...
@@ -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
,
" "
);
...
...
Python/frozen.c
View file @
7701e6ef
...
...
@@ -28,7 +28,7 @@ static unsigned char M___hello__[] = {
#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 */
...
...
@@ -42,4 +42,4 @@ static struct _frozen _PyImport_FrozenModules[] = {
/* 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
;
Python/importlib.h
View file @
7701e6ef
/* 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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment