home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / Python / frozen.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-25  |  965 b   |  32 lines

  1.  
  2. /* Dummy frozen modules initializer */
  3.  
  4. #include "Python.h"
  5.  
  6. /* In order to test the support for frozen modules, by default we
  7.    define a single frozen module, __hello__.  Loading it will print
  8.    some famous words... */
  9.  
  10. static unsigned char M___hello__[] = {
  11.     99,0,0,0,0,1,0,0,0,115,15,0,0,0,127,0,
  12.     0,127,1,0,100,0,0,71,72,100,1,0,83,40,2,0,
  13.     0,0,115,14,0,0,0,72,101,108,108,111,32,119,111,114,
  14.     108,100,46,46,46,78,40,0,0,0,0,40,0,0,0,0,
  15.     115,8,0,0,0,104,101,108,108,111,46,112,121,115,1,0,
  16.     0,0,63,1,0,115,0,0,0,0,
  17. };
  18.  
  19. static struct _frozen _PyImport_FrozenModules[] = {
  20.     /* Test module */
  21.     {"__hello__", M___hello__, 90},
  22.     /* Test package (negative size indicates package-ness) */
  23.     {"__phello__", M___hello__, -90},
  24.     {"__phello__.spam", M___hello__, 90},
  25.     {0, 0, 0} /* sentinel */
  26. };
  27.  
  28. /* Embedding apps may change this pointer to point to their favorite
  29.    collection of frozen modules: */
  30.  
  31. struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;
  32.