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