blob: 7512de565f19161ddebe2761cad5195ab17a6f17 [file] [log] [blame]
Guido van Rossum50d4cc21997-11-22 21:59:45 +00001/* -*- C -*- ***********************************************
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00002Copyright (c) 2000, BeOpen.com.
3Copyright (c) 1995-2000, Corporation for National Research Initiatives.
4Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
5All rights reserved.
Guido van Rossum50d4cc21997-11-22 21:59:45 +00006
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00007See the file "Misc/COPYRIGHT" for information on usage and
8redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Guido van Rossum50d4cc21997-11-22 21:59:45 +00009******************************************************************/
10
11/* Module configuration */
12
13/* This file contains the table of built-in modules.
14 See init_builtin() in import.c. */
15
16#include "Python.h"
17
Thomas Wouters78890102000-07-22 19:25:51 +000018extern void initarray(void);
19extern void initaudioop(void);
20extern void initbinascii(void);
21extern void initcmath(void);
22extern void initerrno(void);
23extern void initimageop(void);
24extern void initmath(void);
25extern void initmd5(void);
Thomas Wouters78890102000-07-22 19:25:51 +000026extern void initnt(void);
27extern void initos2(void);
28extern void initoperator(void);
29extern void initposix(void);
30extern void initregex(void);
31extern void initrgbimg(void);
Thomas Wouters78890102000-07-22 19:25:51 +000032extern void initsignal(void);
33extern void initselect(void);
34extern void init_socket(void);
Thomas Wouters78890102000-07-22 19:25:51 +000035extern void initstrop(void);
36extern void initstruct(void);
37extern void inittime(void);
38extern void initthread(void);
39extern void initcStringIO(void);
40extern void initcPickle(void);
41extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000042#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000043extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000044#endif
45
46/* -- ADDMODULE MARKER 1 -- */
47
Thomas Wouters78890102000-07-22 19:25:51 +000048extern void PyMarshal_Init(void);
49extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000050
51struct _inittab _PyImport_Inittab[] = {
52
53 {"array", initarray},
54#ifdef M_I386
55 {"audioop", initaudioop},
56#endif
57 {"binascii", initbinascii},
58 {"cmath", initcmath},
59 {"errno", initerrno},
60// {"imageop", initimageop},
61 {"math", initmath},
62 {"md5", initmd5},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000063#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
64 {"nt", initnt}, /* Use the NT os functions, not posix */
65#else
66#if defined(PYOS_OS2)
67 {"os2", initos2},
68#else
69 {"posix", initposix},
70#endif
71#endif
72 {"operator", initoperator},
73 {"regex", initregex},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000074// {"rgbimg", initrgbimg},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000075 {"signal", initsignal},
76#ifdef USE_SOCKET
77 {"_socket", init_socket},
78 {"select", initselect},
79#endif
Guido van Rossum50d4cc21997-11-22 21:59:45 +000080 {"strop", initstrop},
81 {"struct", initstruct},
82 {"time", inittime},
83#ifdef WITH_THREAD
84 {"thread", initthread},
85#endif
86 {"cStringIO", initcStringIO},
87 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +000088 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000089#ifdef WIN32
90 {"msvcrt", initmsvcrt},
91#endif
92
93/* -- ADDMODULE MARKER 2 -- */
94
95 /* This module "lives in" with marshal.c */
96 {"marshal", PyMarshal_Init},
97
98 /* This lives it with import.c */
99 {"imp", initimp},
100
101 /* These entries are here for sys.builtin_module_names */
102 {"__main__", NULL},
103 {"__builtin__", NULL},
104 {"sys", NULL},
105
106 /* Sentinel */
107 {0, 0}
108};