blob: 9bb57520b390f584e1b33e9ee38f9ab0257501aa [file] [log] [blame]
Guido van Rossum50d4cc21997-11-22 21:59:45 +00001/* -*- C -*- ***********************************************
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00002Copyright (c) 2000, BeOpen.com.
3Copyright (c) 1995-2000, Corporation for National Research Initiatives.
4Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
5All rights reserved.
Guido van Rossum50d4cc21997-11-22 21:59:45 +00006
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00007See the file "Misc/COPYRIGHT" for information on usage and
8redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Guido van Rossum50d4cc21997-11-22 21:59:45 +00009******************************************************************/
10
11/* Module configuration */
12
13/* This file contains the table of built-in modules.
14 See init_builtin() in import.c. */
15
16#include "Python.h"
17
Thomas Wouters78890102000-07-22 19:25:51 +000018extern void initarray(void);
19extern void initaudioop(void);
20extern void initbinascii(void);
21extern void initcmath(void);
22extern void initerrno(void);
23extern void initimageop(void);
24extern void initmath(void);
25extern void initmd5(void);
Thomas Wouters78890102000-07-22 19:25:51 +000026extern void initnt(void);
27extern void initos2(void);
28extern void initoperator(void);
29extern void initposix(void);
Thomas Wouters78890102000-07-22 19:25:51 +000030extern void initrgbimg(void);
Thomas Wouters78890102000-07-22 19:25:51 +000031extern void initsignal(void);
32extern void initselect(void);
33extern void init_socket(void);
Thomas Wouters78890102000-07-22 19:25:51 +000034extern void initstrop(void);
35extern void initstruct(void);
36extern void inittime(void);
37extern void initthread(void);
38extern void initcStringIO(void);
39extern void initcPickle(void);
40extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000041#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000042extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000043#endif
44
45/* -- ADDMODULE MARKER 1 -- */
46
Thomas Wouters78890102000-07-22 19:25:51 +000047extern void PyMarshal_Init(void);
48extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000049
50struct _inittab _PyImport_Inittab[] = {
51
52 {"array", initarray},
53#ifdef M_I386
54 {"audioop", initaudioop},
55#endif
56 {"binascii", initbinascii},
57 {"cmath", initcmath},
58 {"errno", initerrno},
59// {"imageop", initimageop},
60 {"math", initmath},
61 {"md5", initmd5},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000062#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
63 {"nt", initnt}, /* Use the NT os functions, not posix */
64#else
65#if defined(PYOS_OS2)
66 {"os2", initos2},
67#else
68 {"posix", initposix},
69#endif
70#endif
71 {"operator", initoperator},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000072// {"rgbimg", initrgbimg},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000073 {"signal", initsignal},
74#ifdef USE_SOCKET
75 {"_socket", init_socket},
76 {"select", initselect},
77#endif
Guido van Rossum50d4cc21997-11-22 21:59:45 +000078 {"strop", initstrop},
79 {"struct", initstruct},
80 {"time", inittime},
81#ifdef WITH_THREAD
82 {"thread", initthread},
83#endif
84 {"cStringIO", initcStringIO},
85 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +000086 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000087#ifdef WIN32
88 {"msvcrt", initmsvcrt},
89#endif
90
91/* -- ADDMODULE MARKER 2 -- */
92
93 /* This module "lives in" with marshal.c */
94 {"marshal", PyMarshal_Init},
95
96 /* This lives it with import.c */
97 {"imp", initimp},
98
99 /* These entries are here for sys.builtin_module_names */
100 {"__main__", NULL},
101 {"__builtin__", NULL},
102 {"sys", NULL},
103
104 /* Sentinel */
105 {0, 0}
106};