blob: 28d02b1b91866fc6697c7e6bddd3c69c9438392f [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);
15extern PyObject* PyInit_gc(void);
16extern PyObject* PyInit_math(void);
17extern PyObject* PyInit__md5(void);
18extern PyObject* PyInit_nt(void);
19extern PyObject* PyInit_operator(void);
20extern PyObject* PyInit_signal(void);
21extern PyObject* PyInit__sha1(void);
22extern PyObject* PyInit__sha256(void);
23extern PyObject* PyInit__sha512(void);
24extern PyObject* PyInit_time(void);
25extern PyObject* PyInit__thread(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000026#ifdef WIN32
Martin v. Löwis6a880a82008-06-11 05:48:29 +000027extern PyObject* PyInit_msvcrt(void);
28extern PyObject* PyInit__locale(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000029#endif
Martin v. Löwis6a880a82008-06-11 05:48:29 +000030extern PyObject* PyInit__codecs(void);
31extern PyObject* PyInit__weakref(void);
32extern PyObject* PyInit_xxsubtype(void);
33extern PyObject* PyInit_zipimport(void);
34extern PyObject* PyInit__random(void);
35extern PyObject* PyInit_itertools(void);
36extern PyObject* PyInit__collections(void);
37extern PyObject* PyInit__heapq(void);
38extern PyObject* PyInit__bisect(void);
39extern PyObject* PyInit__symtable(void);
40extern PyObject* PyInit_mmap(void);
41extern PyObject* PyInit__csv(void);
42extern PyObject* PyInit__sre(void);
43extern PyObject* PyInit_parser(void);
44extern PyObject* PyInit_winreg(void);
45extern PyObject* PyInit__struct(void);
46extern PyObject* PyInit_datetime(void);
47extern PyObject* PyInit__functools(void);
48extern PyObject* PyInit__json(void);
49extern PyObject* PyInit_zlib(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000050
Martin v. Löwis6a880a82008-06-11 05:48:29 +000051extern PyObject* PyInit__multibytecodec(void);
52extern PyObject* PyInit__codecs_cn(void);
53extern PyObject* PyInit__codecs_hk(void);
54extern PyObject* PyInit__codecs_iso2022(void);
55extern PyObject* PyInit__codecs_jp(void);
56extern PyObject* PyInit__codecs_kr(void);
57extern PyObject* PyInit__codecs_tw(void);
58extern PyObject* PyInit__subprocess(void);
59extern PyObject* PyInit__lsprof(void);
60extern PyObject* PyInit__ast(void);
Benjamin Peterson4fa88fa2009-03-04 00:14:51 +000061extern PyObject* PyInit__io(void);
Amaury Forgeot d'Arc9d865c92008-06-12 22:27:27 +000062extern PyObject* PyInit__pickle(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000063extern PyObject* PyInit_atexit(void);
64extern PyObject* _PyWarnings_Init(void);
Martin v. Löwisdaea3e52004-01-21 07:54:02 +000065
Martin v. Löwis69206522003-04-18 10:51:14 +000066/* tools/freeze/makeconfig.py marker for additional "extern" */
Guido van Rossum87d5e701996-05-28 22:50:17 +000067/* -- ADDMODULE MARKER 1 -- */
68
Martin v. Löwis6a880a82008-06-11 05:48:29 +000069extern PyObject* PyMarshal_Init(void);
70extern PyObject* PyInit_imp(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000071
Guido van Rossum2b713b21997-04-29 20:46:45 +000072struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000073
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +000074 {"array", PyInit_array},
75 {"_ast", PyInit__ast},
Guido van Rossum8f81a221999-02-05 22:34:57 +000076#ifdef MS_WINDOWS
Guido van Rossum360e4b82007-05-14 22:51:27 +000077#ifndef MS_WINI64
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +000078 {"audioop", PyInit_audioop},
Guido van Rossum87d5e701996-05-28 22:50:17 +000079#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000080#endif
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +000081 {"binascii", PyInit_binascii},
82 {"cmath", PyInit_cmath},
83 {"errno", PyInit_errno},
84 {"gc", PyInit_gc},
85 {"math", PyInit_math},
86 {"nt", PyInit_nt}, /* Use the NT os functions, not posix */
87 {"operator", PyInit_operator},
88 {"signal", PyInit_signal},
89 {"_md5", PyInit__md5},
90 {"_sha1", PyInit__sha1},
91 {"_sha256", PyInit__sha256},
92 {"_sha512", PyInit__sha512},
93 {"time", PyInit_time},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000094#ifdef WITH_THREAD
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +000095 {"_thread", PyInit__thread},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000096#endif
Guido van Rossum29c1ea51997-08-07 00:11:34 +000097#ifdef WIN32
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +000098 {"msvcrt", PyInit_msvcrt},
99 {"_locale", PyInit__locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000100#endif
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000101 /* XXX Should _subprocess go in a WIN32 block? not WIN64? */
102 {"_subprocess", PyInit__subprocess},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000103
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000104 {"_codecs", PyInit__codecs},
105 {"_weakref", PyInit__weakref},
106 {"_random", PyInit__random},
107 {"_bisect", PyInit__bisect},
108 {"_heapq", PyInit__heapq},
109 {"_lsprof", PyInit__lsprof},
110 {"itertools", PyInit_itertools},
111 {"_collections", PyInit__collections},
112 {"_symtable", PyInit__symtable},
113 {"mmap", PyInit_mmap},
114 {"_csv", PyInit__csv},
115 {"_sre", PyInit__sre},
116 {"parser", PyInit_parser},
117 {"winreg", PyInit_winreg},
118 {"_struct", PyInit__struct},
119 {"datetime", PyInit_datetime},
120 {"_functools", PyInit__functools},
121 {"_json", PyInit__json},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000122
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000123 {"xxsubtype", PyInit_xxsubtype},
124 {"zipimport", PyInit_zipimport},
125 {"zlib", PyInit_zlib},
126
127 /* CJK codecs */
128 {"_multibytecodec", PyInit__multibytecodec},
129 {"_codecs_cn", PyInit__codecs_cn},
130 {"_codecs_hk", PyInit__codecs_hk},
131 {"_codecs_iso2022", PyInit__codecs_iso2022},
132 {"_codecs_jp", PyInit__codecs_jp},
133 {"_codecs_kr", PyInit__codecs_kr},
134 {"_codecs_tw", PyInit__codecs_tw},
Martin v. Löwisdaea3e52004-01-21 07:54:02 +0000135
Martin v. Löwis69206522003-04-18 10:51:14 +0000136/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000137/* -- ADDMODULE MARKER 2 -- */
138
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000139 /* This module "lives in" with marshal.c */
140 {"marshal", PyMarshal_Init},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000141
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000142 /* This lives it with import.c */
143 {"imp", PyInit_imp},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000144
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000145 /* These entries are here for sys.builtin_module_names */
146 {"__main__", NULL},
147 {"builtins", NULL},
148 {"sys", NULL},
149 {"_warnings", _PyWarnings_Init},
Christian Heimes33fe8092008-04-13 13:53:33 +0000150
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000151 {"_io", PyInit__io},
152 {"_pickle", PyInit__pickle},
153 {"atexit", PyInit_atexit},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000154
Antoine Pitrou7f14f0d2010-05-09 16:14:21 +0000155 /* Sentinel */
156 {0, 0}
Guido van Rossum87d5e701996-05-28 22:50:17 +0000157};