blob: 8df3f5f2c1ad5fa8d9f86125816b0860bb6a76c5 [file] [log] [blame]
Guido van Rossum87d5e701996-05-28 22:50:17 +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
Guido van Rossumd266eb41996-10-25 14:44:06 +000012Centrum 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.
Guido van Rossum87d5e701996-05-28 22:50:17 +000016
Guido van Rossumd266eb41996-10-25 14:44:06 +000017While 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.
Guido van Rossum87d5e701996-05-28 22:50:17 +000029
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();
Guido van Rossum1bc716f1996-06-28 19:12:06 +000042extern void initcmath();
Guido van Rossum950a1261996-07-30 17:38:17 +000043extern void initerrno();
Guido van Rossum87d5e701996-05-28 22:50:17 +000044extern void initimageop();
45extern void initmath();
46extern void initmd5();
47extern void initnew();
48extern void initnt();
Guido van Rossum950a1261996-07-30 17:38:17 +000049extern void initoperator();
Guido van Rossum87d5e701996-05-28 22:50:17 +000050extern void initregex();
Guido van Rossum8b523f91997-08-21 02:28:40 +000051extern void initreop();
Guido van Rossum87d5e701996-05-28 22:50:17 +000052extern void initrgbimg();
53extern void initrotor();
54extern void initsignal();
Guido van Rossum1bc716f1996-06-28 19:12:06 +000055extern void initselect();
Guido van Rossumf2e98b41996-06-26 19:53:41 +000056extern void init_socket();
Guido van Rossum87d5e701996-05-28 22:50:17 +000057extern void initsoundex();
58extern void initstrop();
59extern void initstruct();
60extern void inittime();
Guido van Rossumbf57ed51996-08-22 00:43:42 +000061extern void initthread();
Guido van Rossum42c2e6a1997-05-06 15:59:14 +000062extern void initcStringIO();
63extern void initcPickle();
Guido van Rossum29c1ea51997-08-07 00:11:34 +000064#ifdef WIN32
65extern void initmsvcrt();
66#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000067
68/* -- ADDMODULE MARKER 1 -- */
69
70extern void PyMarshal_Init();
71extern void initimp();
72
Guido van Rossum2b713b21997-04-29 20:46:45 +000073struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000074
75 {"array", initarray},
76#ifdef M_I386
77 {"audioop", initaudioop},
78#endif
79 {"binascii", initbinascii},
Guido van Rossum1bc716f1996-06-28 19:12:06 +000080 {"cmath", initcmath},
Guido van Rossum950a1261996-07-30 17:38:17 +000081 {"errno", initerrno},
Guido van Rossum87d5e701996-05-28 22:50:17 +000082 {"imageop", initimageop},
83 {"math", initmath},
84 {"md5", initmd5},
85 {"new", initnew},
Guido van Rossum2e146b31997-05-06 16:00:32 +000086 {"nt", initnt}, /* Use the NT os functions, not posix */
Guido van Rossum950a1261996-07-30 17:38:17 +000087 {"operator", initoperator},
Guido van Rossum87d5e701996-05-28 22:50:17 +000088 {"regex", initregex},
Guido van Rossum8b523f91997-08-21 02:28:40 +000089 {"reop", initreop},
Guido van Rossum87d5e701996-05-28 22:50:17 +000090 {"rgbimg", initrgbimg},
91 {"rotor", initrotor},
92 {"signal", initsignal},
93#ifdef USE_SOCKET
Guido van Rossum2e146b31997-05-06 16:00:32 +000094 {"_socket", init_socket},
95 {"select", initselect},
Guido van Rossum87d5e701996-05-28 22:50:17 +000096#endif
97 {"soundex", initsoundex},
98 {"strop", initstrop},
99 {"struct", initstruct},
100 {"time", inittime},
Guido van Rossumbf57ed51996-08-22 00:43:42 +0000101#ifdef WITH_THREAD
102 {"thread", initthread},
103#endif
Guido van Rossum2e146b31997-05-06 16:00:32 +0000104 {"cStringIO", initcStringIO},
105 {"cPickle", initcPickle},
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000106#ifdef WIN32
107 {"msvcrt", initmsvcrt},
108#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000109
110/* -- ADDMODULE MARKER 2 -- */
111
112 /* This module "lives in" with marshal.c */
113 {"marshal", PyMarshal_Init},
114
115 /* This lives it with import.c */
116 {"imp", initimp},
117
118 /* These entries are here for sys.builtin_module_names */
119 {"__main__", NULL},
120 {"__builtin__", NULL},
121 {"sys", NULL},
122
123 /* Sentinel */
124 {0, 0}
125};