No issues found
1 /* Dummy frozen modules initializer */
2
3 #include "Python.h"
4
5 /* In order to test the support for frozen modules, by default we
6 define a single frozen module, __hello__. Loading it will print
7 some famous words... */
8
9 /* To regenerate this data after the bytecode or marshal format has changed,
10 go to ../Tools/freeze/ and freeze the hello.py file; then copy and paste
11 the appropriate bytes from M___main__.c. */
12
13 static unsigned char M___hello__[] = {
14 99,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
15 0,115,9,0,0,0,100,0,0,71,72,100,1,0,83,40,
16 2,0,0,0,115,14,0,0,0,72,101,108,108,111,32,119,
17 111,114,108,100,46,46,46,78,40,0,0,0,0,40,0,0,
18 0,0,40,0,0,0,0,40,0,0,0,0,115,8,0,0,
19 0,104,101,108,108,111,46,112,121,115,1,0,0,0,63,1,
20 0,0,0,115,0,0,0,0,
21 };
22
23 #define SIZE (int)sizeof(M___hello__)
24
25 static struct _frozen _PyImport_FrozenModules[] = {
26 /* Test module */
27 {"__hello__", M___hello__, SIZE},
28 /* Test package (negative size indicates package-ness) */
29 {"__phello__", M___hello__, -SIZE},
30 {"__phello__.spam", M___hello__, SIZE},
31 {0, 0, 0} /* sentinel */
32 };
33
34 /* Embedding apps may change this pointer to point to their favorite
35 collection of frozen modules: */
36
37 struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;