blob: b26b5217da094ce5218b24bb6dd4d05758adf5b4 [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);
Georg Brandl2067bfd2008-05-25 13:05:15 +000036extern void init_thread(void);
Thomas Wouters78890102000-07-22 19:25:51 +000037extern void initpcre(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000038#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000039extern void initmsvcrt(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000040#endif
41
42/* -- ADDMODULE MARKER 1 -- */
43
Thomas Wouters78890102000-07-22 19:25:51 +000044extern void PyMarshal_Init(void);
45extern void initimp(void);
Guido van Rossum50d4cc21997-11-22 21:59:45 +000046
47struct _inittab _PyImport_Inittab[] = {
48
49 {"array", initarray},
50#ifdef M_I386
51 {"audioop", initaudioop},
52#endif
53 {"binascii", initbinascii},
54 {"cmath", initcmath},
55 {"errno", initerrno},
56// {"imageop", initimageop},
57 {"math", initmath},
58 {"md5", initmd5},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000059#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
60 {"nt", initnt}, /* Use the NT os functions, not posix */
61#else
62#if defined(PYOS_OS2)
63 {"os2", initos2},
64#else
65 {"posix", initposix},
66#endif
67#endif
68 {"operator", initoperator},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000069// {"rgbimg", initrgbimg},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000070 {"signal", initsignal},
71#ifdef USE_SOCKET
72 {"_socket", init_socket},
73 {"select", initselect},
74#endif
Guido van Rossum50d4cc21997-11-22 21:59:45 +000075 {"struct", initstruct},
76 {"time", inittime},
77#ifdef WITH_THREAD
Georg Brandl2067bfd2008-05-25 13:05:15 +000078 {"_thread", init_thread},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000079#endif
Guido van Rossuma34c3131997-12-05 22:07:14 +000080 {"pcre", initpcre},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000081#ifdef WIN32
82 {"msvcrt", initmsvcrt},
83#endif
84
85/* -- ADDMODULE MARKER 2 -- */
86
87 /* This module "lives in" with marshal.c */
88 {"marshal", PyMarshal_Init},
89
90 /* This lives it with import.c */
Brett Cannon6f44d662012-04-15 16:08:47 -040091 {"_imp", initimp},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000092
93 /* These entries are here for sys.builtin_module_names */
Georg Brandl1a3284e2007-12-02 09:40:06 +000094 {"builtins", NULL},
Guido van Rossum50d4cc21997-11-22 21:59:45 +000095 {"sys", NULL},
96
97 /* Sentinel */
98 {0, 0}
99};