blob: 35a443dd7c94f69be497f03f9623a31d59092a94 [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
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00007Copyright (c) 2000, BeOpen.com.
8Copyright (c) 1995-2000, Corporation for National Research Initiatives.
9Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
10All rights reserved.
Guido van Rossum582646a1996-05-28 22:30:17 +000011
Guido van Rossumfd71b9e2000-06-30 23:50:40 +000012See the file "Misc/COPYRIGHT" for information on usage and
13redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Guido van Rossum582646a1996-05-28 22:30:17 +000014
15******************************************************************/
16
17/* Dummy frozen modules initializer */
18
19#include "Python.h"
20
Guido van Rossum667d7041995-08-04 04:20:48 +000021/* In order to test the support for frozen modules, by default we
22 define a single frozen module, __hello__. Loading it will print
23 some famous words... */
24
25static unsigned char M___hello__[] = {
Guido van Rossum019db5d1997-07-19 21:54:24 +000026 99,0,0,0,0,1,0,0,0,115,15,0,0,0,127,0,
27 0,127,1,0,100,0,0,71,72,100,1,0,83,40,2,0,
28 0,0,115,14,0,0,0,72,101,108,108,111,32,119,111,114,
29 108,100,46,46,46,78,40,0,0,0,0,40,0,0,0,0,
30 115,8,0,0,0,104,101,108,108,111,46,112,121,115,1,0,
31 0,0,63,1,0,115,0,0,0,0,
Guido van Rossum667d7041995-08-04 04:20:48 +000032};
33
Guido van Rossum7c46a921996-06-17 17:07:23 +000034static struct _frozen _PyImport_FrozenModules[] = {
Guido van Rossumf015e181998-04-03 21:10:36 +000035 /* Test module */
Guido van Rossum019db5d1997-07-19 21:54:24 +000036 {"__hello__", M___hello__, 90},
Guido van Rossumf015e181998-04-03 21:10:36 +000037 /* Test package (negative size indicates package-ness) */
38 {"__phello__", M___hello__, -90},
39 {"__phello__.spam", M___hello__, 90},
Guido van Rossum667d7041995-08-04 04:20:48 +000040 {0, 0, 0} /* sentinel */
41};
Guido van Rossum7c46a921996-06-17 17:07:23 +000042
43/* Embedding apps may change this pointer to point to their favorite
44 collection of frozen modules: */
45
46struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;