blob: 37f05548aba84be4502ea285e115fe4f4586dbe1 [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);
Thomas Wouters78890102000-07-22 19:25:51 +000030extern void initrgbimg(void);
Thomas Wouters78890102000-07-22 19:25:51 +000031extern void initsignal(void);
32extern void initselect(void);
33extern void init_socket(void);
Thomas Wouters78890102000-07-22 19:25:51 +000034extern void initstruct(void);
35extern void inittime(void);
36extern void initthread(void);
37extern void initcStringIO(void);
38extern void initcPickle(void);
39extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000040#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000041extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000042#endif
43
44/* -- ADDMODULE MARKER 1 -- */
45
Thomas Wouters78890102000-07-22 19:25:51 +000046extern void PyMarshal_Init(void);
47extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000048
49struct _inittab _PyImport_Inittab[] = {
50
51 {"array", initarray},
52#ifdef M_I386
53 {"audioop", initaudioop},
54#endif
55 {"binascii", initbinascii},
56 {"cmath", initcmath},
57 {"errno", initerrno},
58// {"imageop", initimageop},
59 {"math", initmath},
60 {"md5", initmd5},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000061#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
62 {"nt", initnt}, /* Use the NT os functions, not posix */
63#else
64#if defined(PYOS_OS2)
65 {"os2", initos2},
66#else
67 {"posix", initposix},
68#endif
69#endif
70 {"operator", initoperator},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000071// {"rgbimg", initrgbimg},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000072 {"signal", initsignal},
73#ifdef USE_SOCKET
74 {"_socket", init_socket},
75 {"select", initselect},
76#endif
Guido van Rossum50d4cc21997-11-22 21:59:45 +000077 {"struct", initstruct},
78 {"time", inittime},
79#ifdef WITH_THREAD
80 {"thread", initthread},
81#endif
82 {"cStringIO", initcStringIO},
83 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +000084 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000085#ifdef WIN32
86 {"msvcrt", initmsvcrt},
87#endif
88
89/* -- ADDMODULE MARKER 2 -- */
90
91 /* This module "lives in" with marshal.c */
92 {"marshal", PyMarshal_Init},
93
94 /* This lives it with import.c */
95 {"imp", initimp},
96
97 /* These entries are here for sys.builtin_module_names */
98 {"__main__", NULL},
99 {"__builtin__", NULL},
100 {"sys", NULL},
101
102 /* Sentinel */
103 {0, 0}
104};