blob: ffe6c7a507311799084059b67d1f7fbbcbcb593d [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
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23******************************************************************/
24
25/* Module configuration */
26
27/* This file contains the table of built-in modules.
28 See init_builtin() in import.c. */
29
30#include "Python.h"
31
Guido van Rossumf2e98b41996-06-26 19:53:41 +000032#ifndef MS_WIN16
33/* Assume all 32-bit platforms come standard with a WINSOCK library */
34#define USE_SOCKET
35#define USE_SELECT
36#endif
37
Guido van Rossum87d5e701996-05-28 22:50:17 +000038extern void initarray();
39extern void initaudioop();
40extern void initbinascii();
41extern void initenvironment();
42extern void initimageop();
43extern void initmath();
44extern void initmd5();
45extern void initnew();
46extern void initnt();
47extern void initregex();
48extern void initrgbimg();
49extern void initrotor();
Guido van Rossumf2e98b41996-06-26 19:53:41 +000050extern void initselect();
Guido van Rossum87d5e701996-05-28 22:50:17 +000051extern void initsignal();
Guido van Rossumf2e98b41996-06-26 19:53:41 +000052extern void init_socket();
Guido van Rossum87d5e701996-05-28 22:50:17 +000053extern void initsoundex();
54extern void initstrop();
55extern void initstruct();
56extern void inittime();
57
58/* -- ADDMODULE MARKER 1 -- */
59
60extern void PyMarshal_Init();
61extern void initimp();
62
63struct {
64 char *name;
65 void (*initfunc)();
66} inittab[] = {
67
68 {"array", initarray},
69#ifdef M_I386
70 {"audioop", initaudioop},
71#endif
72 {"binascii", initbinascii},
73 {"environment", initenvironment},
74 {"imageop", initimageop},
75 {"math", initmath},
76 {"md5", initmd5},
77 {"new", initnew},
78 {"nt", initnt}, /* Use the NT os functions, not posix */
79 {"regex", initregex},
80 {"rgbimg", initrgbimg},
81 {"rotor", initrotor},
Guido van Rossumf2e98b41996-06-26 19:53:41 +000082#ifdef USE_SELECT
83 {"select", initselect},
84#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000085 {"signal", initsignal},
86#ifdef USE_SOCKET
Guido van Rossumf2e98b41996-06-26 19:53:41 +000087 {"_socket", init_socket},
Guido van Rossum87d5e701996-05-28 22:50:17 +000088#endif
89 {"soundex", initsoundex},
90 {"strop", initstrop},
91 {"struct", initstruct},
92 {"time", inittime},
93
94/* -- ADDMODULE MARKER 2 -- */
95
96 /* This module "lives in" with marshal.c */
97 {"marshal", PyMarshal_Init},
98
99 /* This lives it with import.c */
100 {"imp", initimp},
101
102 /* These entries are here for sys.builtin_module_names */
103 {"__main__", NULL},
104 {"__builtin__", NULL},
105 {"sys", NULL},
106
107 /* Sentinel */
108 {0, 0}
109};