blob: 1f9ca50c61ebf51ead6269f464c3d46867e8196f [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);
32extern void initrotor(void);
33extern void initsignal(void);
34extern void initselect(void);
35extern void init_socket(void);
Thomas Wouters78890102000-07-22 19:25:51 +000036extern void initstrop(void);
37extern void initstruct(void);
38extern void inittime(void);
39extern void initthread(void);
40extern void initcStringIO(void);
41extern void initcPickle(void);
42extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000043#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000044extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000045#endif
46
47/* -- ADDMODULE MARKER 1 -- */
48
Thomas Wouters78890102000-07-22 19:25:51 +000049extern void PyMarshal_Init(void);
50extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000051
52struct _inittab _PyImport_Inittab[] = {
53
54 {"array", initarray},
55#ifdef M_I386
56 {"audioop", initaudioop},
57#endif
58 {"binascii", initbinascii},
59 {"cmath", initcmath},
60 {"errno", initerrno},
61// {"imageop", initimageop},
62 {"math", initmath},
63 {"md5", initmd5},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000064#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
65 {"nt", initnt}, /* Use the NT os functions, not posix */
66#else
67#if defined(PYOS_OS2)
68 {"os2", initos2},
69#else
70 {"posix", initposix},
71#endif
72#endif
73 {"operator", initoperator},
74 {"regex", initregex},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000075// {"rgbimg", initrgbimg},
76// {"rotor", initrotor},
77 {"signal", initsignal},
78#ifdef USE_SOCKET
79 {"_socket", init_socket},
80 {"select", initselect},
81#endif
Guido van Rossum50d4cc21997-11-22 21:59:45 +000082 {"strop", initstrop},
83 {"struct", initstruct},
84 {"time", inittime},
85#ifdef WITH_THREAD
86 {"thread", initthread},
87#endif
88 {"cStringIO", initcStringIO},
89 {"cPickle", initcPickle},
Guido van Rossuma34c3131997-12-05 22:07:14 +000090 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000091#ifdef WIN32
92 {"msvcrt", initmsvcrt},
93#endif
94
95/* -- ADDMODULE MARKER 2 -- */
96
97 /* This module "lives in" with marshal.c */
98 {"marshal", PyMarshal_Init},
99
100 /* This lives it with import.c */
101 {"imp", initimp},
102
103 /* These entries are here for sys.builtin_module_names */
104 {"__main__", NULL},
105 {"__builtin__", NULL},
106 {"sys", NULL},
107
108 /* Sentinel */
109 {0, 0}
110};