blob: 11caad26a9423b7897593232c6fb97131a9e9bb4 [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();
Guido van Rossum50d4cc21997-11-22 21:59:45 +000053extern void initrgbimg();
54extern void initrotor();
55extern void initsignal();
56extern void initselect();
57extern void init_socket();
58extern void initsoundex();
59extern void initstrop();
60extern void initstruct();
61extern void inittime();
62extern void initthread();
63extern void initcStringIO();
64extern void initcPickle();
Guido van Rossuma34c3131997-12-05 22:07:14 +000065extern void initpcre();
Guido van Rossum50d4cc21997-11-22 21:59:45 +000066#ifdef WIN32
67extern void initmsvcrt();
68#endif
69
70/* -- ADDMODULE MARKER 1 -- */
71
72extern void PyMarshal_Init();
73extern void initimp();
74
75struct _inittab _PyImport_Inittab[] = {
76
77 {"array", initarray},
78#ifdef M_I386
79 {"audioop", initaudioop},
80#endif
81 {"binascii", initbinascii},
82 {"cmath", initcmath},
83 {"errno", initerrno},
84// {"imageop", initimageop},
85 {"math", initmath},
86 {"md5", initmd5},
87 {"new", initnew},
88#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
89 {"nt", initnt}, /* Use the NT os functions, not posix */
90#else
91#if defined(PYOS_OS2)
92 {"os2", initos2},
93#else
94 {"posix", initposix},
95#endif
96#endif
97 {"operator", initoperator},
98 {"regex", initregex},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000099// {"rgbimg", initrgbimg},
100// {"rotor", initrotor},
101 {"signal", initsignal},
102#ifdef USE_SOCKET
103 {"_socket", init_socket},
104 {"select", initselect},
105#endif
106 {"soundex", initsoundex},
107 {"strop", initstrop},
108 {"struct", initstruct},
109 {"time", inittime},
110#ifdef WITH_THREAD
111 {"thread", initthread},
112#endif
113 {"cStringIO", initcStringIO},
114 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +0000115 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +0000116#ifdef WIN32
117 {"msvcrt", initmsvcrt},
118#endif
119
120/* -- ADDMODULE MARKER 2 -- */
121
122 /* This module "lives in" with marshal.c */
123 {"marshal", PyMarshal_Init},
124
125 /* This lives it with import.c */
126 {"imp", initimp},
127
128 /* These entries are here for sys.builtin_module_names */
129 {"__main__", NULL},
130 {"__builtin__", NULL},
131 {"sys", NULL},
132
133 /* Sentinel */
134 {0, 0}
135};