blob: be51b55108a35b0c3a0cd9dac6d1d4577544f7ee [file] [log] [blame]
Guido van Rossum87d5e701996-05-28 22:50:17 +00001/* Module configuration */
2
3/* This file contains the table of built-in modules.
4 See init_builtin() in import.c. */
5
6#include "Python.h"
7
Martin v. Löwis6a880a82008-06-11 05:48:29 +00008extern PyObject* PyInit_array(void);
Guido van Rossum360e4b82007-05-14 22:51:27 +00009#ifndef MS_WINI64
Martin v. Löwis6a880a82008-06-11 05:48:29 +000010extern PyObject* PyInit_audioop(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000011#endif
Martin v. Löwis6a880a82008-06-11 05:48:29 +000012extern PyObject* PyInit_binascii(void);
13extern PyObject* PyInit_cmath(void);
14extern PyObject* PyInit_errno(void);
Victor Stinner024e37a2011-03-31 01:31:06 +020015extern PyObject* PyInit_faulthandler(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000016extern PyObject* PyInit_gc(void);
17extern PyObject* PyInit_math(void);
18extern PyObject* PyInit__md5(void);
19extern PyObject* PyInit_nt(void);
20extern PyObject* PyInit_operator(void);
21extern PyObject* PyInit_signal(void);
22extern PyObject* PyInit__sha1(void);
23extern PyObject* PyInit__sha256(void);
24extern PyObject* PyInit__sha512(void);
25extern PyObject* PyInit_time(void);
26extern PyObject* PyInit__thread(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000027#ifdef WIN32
Martin v. Löwis6a880a82008-06-11 05:48:29 +000028extern PyObject* PyInit_msvcrt(void);
29extern PyObject* PyInit__locale(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000030#endif
Martin v. Löwis6a880a82008-06-11 05:48:29 +000031extern PyObject* PyInit__codecs(void);
32extern PyObject* PyInit__weakref(void);
33extern PyObject* PyInit_xxsubtype(void);
34extern PyObject* PyInit_zipimport(void);
35extern PyObject* PyInit__random(void);
36extern PyObject* PyInit_itertools(void);
37extern PyObject* PyInit__collections(void);
38extern PyObject* PyInit__heapq(void);
39extern PyObject* PyInit__bisect(void);
40extern PyObject* PyInit__symtable(void);
41extern PyObject* PyInit_mmap(void);
42extern PyObject* PyInit__csv(void);
43extern PyObject* PyInit__sre(void);
44extern PyObject* PyInit_parser(void);
45extern PyObject* PyInit_winreg(void);
46extern PyObject* PyInit__struct(void);
Alexander Belopolskycf86e362010-07-23 19:25:47 +000047extern PyObject* PyInit__datetime(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000048extern PyObject* PyInit__functools(void);
49extern PyObject* PyInit__json(void);
50extern PyObject* PyInit_zlib(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000051
Martin v. Löwis6a880a82008-06-11 05:48:29 +000052extern PyObject* PyInit__multibytecodec(void);
53extern PyObject* PyInit__codecs_cn(void);
54extern PyObject* PyInit__codecs_hk(void);
55extern PyObject* PyInit__codecs_iso2022(void);
56extern PyObject* PyInit__codecs_jp(void);
57extern PyObject* PyInit__codecs_kr(void);
58extern PyObject* PyInit__codecs_tw(void);
59extern PyObject* PyInit__subprocess(void);
60extern PyObject* PyInit__lsprof(void);
61extern PyObject* PyInit__ast(void);
Benjamin Peterson4fa88fa2009-03-04 00:14:51 +000062extern PyObject* PyInit__io(void);
Amaury Forgeot d'Arc9d865c92008-06-12 22:27:27 +000063extern PyObject* PyInit__pickle(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000064extern PyObject* PyInit_atexit(void);
65extern PyObject* _PyWarnings_Init(void);
Georg Brandl66c221e2010-10-14 07:04:07 +000066extern PyObject* PyInit__string(void);
Martin v. Löwisdaea3e52004-01-21 07:54:02 +000067
Martin v. Löwis69206522003-04-18 10:51:14 +000068/* tools/freeze/makeconfig.py marker for additional "extern" */
Guido van Rossum87d5e701996-05-28 22:50:17 +000069/* -- ADDMODULE MARKER 1 -- */
70
Martin v. Löwis6a880a82008-06-11 05:48:29 +000071extern PyObject* PyMarshal_Init(void);
72extern PyObject* PyInit_imp(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000073
Guido van Rossum2b713b21997-04-29 20:46:45 +000074struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000075
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000076 {"array", PyInit_array},
77 {"_ast", PyInit__ast},
Guido van Rossum8f81a221999-02-05 22:34:57 +000078#ifdef MS_WINDOWS
Guido van Rossum360e4b82007-05-14 22:51:27 +000079#ifndef MS_WINI64
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000080 {"audioop", PyInit_audioop},
Guido van Rossum87d5e701996-05-28 22:50:17 +000081#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000082#endif
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000083 {"binascii", PyInit_binascii},
84 {"cmath", PyInit_cmath},
85 {"errno", PyInit_errno},
Victor Stinner024e37a2011-03-31 01:31:06 +020086 {"faulthandler", PyInit_faulthandler},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000087 {"gc", PyInit_gc},
88 {"math", PyInit_math},
89 {"nt", PyInit_nt}, /* Use the NT os functions, not posix */
90 {"operator", PyInit_operator},
91 {"signal", PyInit_signal},
92 {"_md5", PyInit__md5},
93 {"_sha1", PyInit__sha1},
94 {"_sha256", PyInit__sha256},
95 {"_sha512", PyInit__sha512},
96 {"time", PyInit_time},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000097#ifdef WITH_THREAD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000098 {"_thread", PyInit__thread},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000099#endif
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000100#ifdef WIN32
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000101 {"msvcrt", PyInit_msvcrt},
102 {"_locale", PyInit__locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000103#endif
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000104 /* XXX Should _subprocess go in a WIN32 block? not WIN64? */
105 {"_subprocess", PyInit__subprocess},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000106
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000107 {"_codecs", PyInit__codecs},
108 {"_weakref", PyInit__weakref},
109 {"_random", PyInit__random},
110 {"_bisect", PyInit__bisect},
111 {"_heapq", PyInit__heapq},
112 {"_lsprof", PyInit__lsprof},
113 {"itertools", PyInit_itertools},
114 {"_collections", PyInit__collections},
115 {"_symtable", PyInit__symtable},
116 {"mmap", PyInit_mmap},
117 {"_csv", PyInit__csv},
118 {"_sre", PyInit__sre},
119 {"parser", PyInit_parser},
120 {"winreg", PyInit_winreg},
121 {"_struct", PyInit__struct},
Alexander Belopolskycf86e362010-07-23 19:25:47 +0000122 {"_datetime", PyInit__datetime},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000123 {"_functools", PyInit__functools},
124 {"_json", PyInit__json},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000125
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000126 {"xxsubtype", PyInit_xxsubtype},
127 {"zipimport", PyInit_zipimport},
128 {"zlib", PyInit_zlib},
129
130 /* CJK codecs */
131 {"_multibytecodec", PyInit__multibytecodec},
132 {"_codecs_cn", PyInit__codecs_cn},
133 {"_codecs_hk", PyInit__codecs_hk},
134 {"_codecs_iso2022", PyInit__codecs_iso2022},
135 {"_codecs_jp", PyInit__codecs_jp},
136 {"_codecs_kr", PyInit__codecs_kr},
137 {"_codecs_tw", PyInit__codecs_tw},
Martin v. Löwisdaea3e52004-01-21 07:54:02 +0000138
Martin v. Löwis69206522003-04-18 10:51:14 +0000139/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000140/* -- ADDMODULE MARKER 2 -- */
141
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000142 /* This module "lives in" with marshal.c */
143 {"marshal", PyMarshal_Init},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000144
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000145 /* This lives it with import.c */
146 {"imp", PyInit_imp},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000147
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000148 /* These entries are here for sys.builtin_module_names */
149 {"__main__", NULL},
150 {"builtins", NULL},
151 {"sys", NULL},
152 {"_warnings", _PyWarnings_Init},
Georg Brandl66c221e2010-10-14 07:04:07 +0000153 {"_string", PyInit__string},
Christian Heimes33fe8092008-04-13 13:53:33 +0000154
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000155 {"_io", PyInit__io},
156 {"_pickle", PyInit__pickle},
157 {"atexit", PyInit_atexit},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000158
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000159 /* Sentinel */
160 {0, 0}
Guido van Rossum87d5e701996-05-28 22:50:17 +0000161};