blob: 3d54e53b3c9169aceda2751d27b00e87c88112e5 [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);
26extern void initnew(void);
27extern void initnt(void);
28extern void initos2(void);
29extern void initoperator(void);
30extern void initposix(void);
31extern void initregex(void);
32extern void initrgbimg(void);
33extern void initrotor(void);
34extern void initsignal(void);
35extern void initselect(void);
36extern void init_socket(void);
37extern void initsoundex(void);
38extern void initstrop(void);
39extern void initstruct(void);
40extern void inittime(void);
41extern void initthread(void);
42extern void initcStringIO(void);
43extern void initcPickle(void);
44extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000045#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000046extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000047#endif
48
49/* -- ADDMODULE MARKER 1 -- */
50
Thomas Wouters78890102000-07-22 19:25:51 +000051extern void PyMarshal_Init(void);
52extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000053
54struct _inittab _PyImport_Inittab[] = {
55
56 {"array", initarray},
57#ifdef M_I386
58 {"audioop", initaudioop},
59#endif
60 {"binascii", initbinascii},
61 {"cmath", initcmath},
62 {"errno", initerrno},
63// {"imageop", initimageop},
64 {"math", initmath},
65 {"md5", initmd5},
66 {"new", initnew},
67#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
68 {"nt", initnt}, /* Use the NT os functions, not posix */
69#else
70#if defined(PYOS_OS2)
71 {"os2", initos2},
72#else
73 {"posix", initposix},
74#endif
75#endif
76 {"operator", initoperator},
77 {"regex", initregex},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000078// {"rgbimg", initrgbimg},
79// {"rotor", initrotor},
80 {"signal", initsignal},
81#ifdef USE_SOCKET
82 {"_socket", init_socket},
83 {"select", initselect},
84#endif
85 {"soundex", initsoundex},
86 {"strop", initstrop},
87 {"struct", initstruct},
88 {"time", inittime},
89#ifdef WITH_THREAD
90 {"thread", initthread},
91#endif
92 {"cStringIO", initcStringIO},
93 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +000094 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000095#ifdef WIN32
96 {"msvcrt", initmsvcrt},
97#endif
98
99/* -- ADDMODULE MARKER 2 -- */
100
101 /* This module "lives in" with marshal.c */
102 {"marshal", PyMarshal_Init},
103
104 /* This lives it with import.c */
105 {"imp", initimp},
106
107 /* These entries are here for sys.builtin_module_names */
108 {"__main__", NULL},
109 {"__builtin__", NULL},
110 {"sys", NULL},
111
112 /* Sentinel */
113 {0, 0}
114};