Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 1 | /*********************************************************** |
| 2 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | The Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI not be used in advertising or publicity pertaining to |
| 13 | distribution of the software without specific, written prior permission. |
| 14 | |
| 15 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 16 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 18 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 21 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | |
| 23 | ******************************************************************/ |
| 24 | |
| 25 | /* Dummy frozen modules initializer */ |
| 26 | |
| 27 | #include "Python.h" |
| 28 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 29 | /* In order to test the support for frozen modules, by default we |
| 30 | define a single frozen module, __hello__. Loading it will print |
| 31 | some famous words... */ |
| 32 | |
| 33 | static unsigned char M___hello__[] = { |
| 34 | 99,0,0,0,0,0,0,115,15,0,0,0,127,0,0,127, |
| 35 | 1,0,100,0,0,71,72,100,1,0,83,40,2,0,0,0, |
| 36 | 115,14,0,0,0,72,101,108,108,111,32,119,111,114,108,100, |
| 37 | 46,46,46,78,40,0,0,0,0,40,0,0,0,0,115,8, |
| 38 | 0,0,0,104,101,108,108,111,46,112,121,115,1,0,0,0, |
| 39 | 63, |
| 40 | }; |
| 41 | |
| 42 | struct frozen { |
| 43 | char *name; |
| 44 | unsigned char *code; |
| 45 | int size; |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 46 | } _PyImport_FrozenModules[] = { |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 47 | {"__hello__", M___hello__, 81}, |
| 48 | {0, 0, 0} /* sentinel */ |
| 49 | }; |