blob: 5f7ad91d8199b025b6efc73887ecd34272c20a16 [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();
66#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},
99 {"reop", initreop},
100// {"rgbimg", initrgbimg},
101// {"rotor", initrotor},
102 {"signal", initsignal},
103#ifdef USE_SOCKET
104 {"_socket", init_socket},
105 {"select", initselect},
106#endif
107 {"soundex", initsoundex},
108 {"strop", initstrop},
109 {"struct", initstruct},
110 {"time", inittime},
111#ifdef WITH_THREAD
112 {"thread", initthread},
113#endif
114 {"cStringIO", initcStringIO},
115 {"cPickle", initcPickle},
116#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};