blob: 7be2b0bcf8c8065173b1ea6b12d1976b4c037513 [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);
Thomas Wouters78890102000-07-22 19:25:51 +000038extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000039#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000040extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000041#endif
42
43/* -- ADDMODULE MARKER 1 -- */
44
Thomas Wouters78890102000-07-22 19:25:51 +000045extern void PyMarshal_Init(void);
46extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000047
48struct _inittab _PyImport_Inittab[] = {
49
50 {"array", initarray},
51#ifdef M_I386
52 {"audioop", initaudioop},
53#endif
54 {"binascii", initbinascii},
55 {"cmath", initcmath},
56 {"errno", initerrno},
57// {"imageop", initimageop},
58 {"math", initmath},
59 {"md5", initmd5},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000060#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
61 {"nt", initnt}, /* Use the NT os functions, not posix */
62#else
63#if defined(PYOS_OS2)
64 {"os2", initos2},
65#else
66 {"posix", initposix},
67#endif
68#endif
69 {"operator", initoperator},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000070// {"rgbimg", initrgbimg},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000071 {"signal", initsignal},
72#ifdef USE_SOCKET
73 {"_socket", init_socket},
74 {"select", initselect},
75#endif
Guido van Rossum50d4cc21997-11-22 21:59:45 +000076 {"struct", initstruct},
77 {"time", inittime},
78#ifdef WITH_THREAD
79 {"thread", initthread},
80#endif
81 {"cStringIO", initcStringIO},
Guido van Rossuma34c3131997-12-05 22:07:14 +000082 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000083#ifdef WIN32
84 {"msvcrt", initmsvcrt},
85#endif
86
87/* -- ADDMODULE MARKER 2 -- */
88
89 /* This module "lives in" with marshal.c */
90 {"marshal", PyMarshal_Init},
91
92 /* This lives it with import.c */
93 {"imp", initimp},
94
95 /* These entries are here for sys.builtin_module_names */
96 {"__main__", NULL},
Georg Brandl1a3284e2007-12-02 09:40:06 +000097 {"builtins", NULL},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000098 {"sys", NULL},
99
100 /* Sentinel */
101 {0, 0}
102};