blob: 39d51ee0d5bbe5cb1339b276053f96d121055b79 [file] [log] [blame]
Guido van Rossum582646a1996-05-28 22:30:17 +00001/***********************************************************
2Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3The Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF 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 Rossum667d7041995-08-04 04:20:48 +000029/* 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
33static 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
Guido van Rossum7c46a921996-06-17 17:07:23 +000042static struct _frozen _PyImport_FrozenModules[] = {
Guido van Rossum667d7041995-08-04 04:20:48 +000043 {"__hello__", M___hello__, 81},
44 {0, 0, 0} /* sentinel */
45};
Guido van Rossum7c46a921996-06-17 17:07:23 +000046
47/* Embedding apps may change this pointer to point to their favorite
48 collection of frozen modules: */
49
50struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;