blob: 3e7adf9cedbe18826c99ce35b1ab290dd33e9912 [file] [log] [blame]
Guido van Rossum50d4cc21997-11-22 21:59:45 +00001/* -*- C -*- ***********************************************
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 or Corporation for National Research Initiatives or
13CNRI not be used in advertising or publicity pertaining to
14distribution of the software without specific, written prior
15permission.
16
17While CWI is the initial source for this software, a modified version
18is made available by the Corporation for National Research Initiatives
19(CNRI) at the Internet address ftp://ftp.python.org.
20
21STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
22REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
23MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
24CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
25DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
26PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
27TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28PERFORMANCE OF THIS SOFTWARE.
29
30******************************************************************/
31
32/* Module configuration */
33
34/* This file contains the table of built-in modules.
35 See init_builtin() in import.c. */
36
37#include "Python.h"
38
39extern void initarray();
40extern void initaudioop();
41extern void initbinascii();
42extern void initcmath();
43extern void initerrno();
44extern void initimageop();
45extern void initmath();
46extern void initmd5();
47extern void initnew();
48extern void initnt();
49extern void initos2();
50extern void initoperator();
51extern void initposix();
52extern void initregex();
53extern void initreop();
54extern void initrgbimg();
55extern void initrotor();
56extern void initsignal();
57extern void initselect();
58extern void init_socket();
59extern void initsoundex();
60extern void initstrop();
61extern void initstruct();
62extern void inittime();
63extern void initthread();
64extern void initcStringIO();
65extern void initcPickle();
Guido van Rossuma34c3131997-12-05 22:07:14 +000066extern void initpcre();
Guido van Rossum50d4cc21997-11-22 21:59:45 +000067#ifdef WIN32
68extern void initmsvcrt();
69#endif
70
71/* -- ADDMODULE MARKER 1 -- */
72
73extern void PyMarshal_Init();
74extern void initimp();
75
76struct _inittab _PyImport_Inittab[] = {
77
78 {"array", initarray},
79#ifdef M_I386
80 {"audioop", initaudioop},
81#endif
82 {"binascii", initbinascii},
83 {"cmath", initcmath},
84 {"errno", initerrno},
85// {"imageop", initimageop},
86 {"math", initmath},
87 {"md5", initmd5},
88 {"new", initnew},
89#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
90 {"nt", initnt}, /* Use the NT os functions, not posix */
91#else
92#if defined(PYOS_OS2)
93 {"os2", initos2},
94#else
95 {"posix", initposix},
96#endif
97#endif
98 {"operator", initoperator},
99 {"regex", initregex},
100 {"reop", initreop},
101// {"rgbimg", initrgbimg},
102// {"rotor", initrotor},
103 {"signal", initsignal},
104#ifdef USE_SOCKET
105 {"_socket", init_socket},
106 {"select", initselect},
107#endif
108 {"soundex", initsoundex},
109 {"strop", initstrop},
110 {"struct", initstruct},
111 {"time", inittime},
112#ifdef WITH_THREAD
113 {"thread", initthread},
114#endif
115 {"cStringIO", initcStringIO},
116 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +0000117 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +0000118#ifdef WIN32
119 {"msvcrt", initmsvcrt},
120#endif
121
122/* -- ADDMODULE MARKER 2 -- */
123
124 /* This module "lives in" with marshal.c */
125 {"marshal", PyMarshal_Init},
126
127 /* This lives it with import.c */
128 {"imp", initimp},
129
130 /* These entries are here for sys.builtin_module_names */
131 {"__main__", NULL},
132 {"__builtin__", NULL},
133 {"sys", NULL},
134
135 /* Sentinel */
136 {0, 0}
137};