blob: 43d9e208cca6b832445f3656b464b14788c6b885 [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.
Nick Coghland5cacbb2015-05-23 22:24:10 +10004 See create_builtin() in import.c. */
Guido van Rossum87d5e701996-05-28 22:50:17 +00005
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);
Victor Stinnered3b0bc2013-11-23 12:27:24 +010016extern PyObject* PyInit__tracemalloc(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000017extern PyObject* PyInit_gc(void);
18extern PyObject* PyInit_math(void);
19extern PyObject* PyInit__md5(void);
20extern PyObject* PyInit_nt(void);
Antoine Pitroua85017f2013-04-20 19:21:44 +020021extern PyObject* PyInit__operator(void);
Giampaolo Rodola'e09fb712014-04-04 15:34:17 +020022extern PyObject* PyInit__signal(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000023extern PyObject* PyInit__sha1(void);
24extern PyObject* PyInit__sha256(void);
25extern PyObject* PyInit__sha512(void);
Christian Heimes6fe2a752016-09-07 11:58:24 +020026extern PyObject* PyInit__sha3(void);
Christian Heimes7ba83372016-09-07 01:45:22 +020027extern PyObject* PyInit__blake2(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000028extern PyObject* PyInit_time(void);
29extern PyObject* PyInit__thread(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000030#ifdef WIN32
Martin v. Löwis6a880a82008-06-11 05:48:29 +000031extern PyObject* PyInit_msvcrt(void);
32extern PyObject* PyInit__locale(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000033#endif
Martin v. Löwis6a880a82008-06-11 05:48:29 +000034extern PyObject* PyInit__codecs(void);
35extern PyObject* PyInit__weakref(void);
36extern PyObject* PyInit_xxsubtype(void);
37extern PyObject* PyInit_zipimport(void);
38extern PyObject* PyInit__random(void);
39extern PyObject* PyInit_itertools(void);
40extern PyObject* PyInit__collections(void);
41extern PyObject* PyInit__heapq(void);
42extern PyObject* PyInit__bisect(void);
43extern PyObject* PyInit__symtable(void);
44extern PyObject* PyInit_mmap(void);
45extern PyObject* PyInit__csv(void);
46extern PyObject* PyInit__sre(void);
47extern PyObject* PyInit_parser(void);
48extern PyObject* PyInit_winreg(void);
49extern PyObject* PyInit__struct(void);
Alexander Belopolskycf86e362010-07-23 19:25:47 +000050extern PyObject* PyInit__datetime(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000051extern PyObject* PyInit__functools(void);
52extern PyObject* PyInit__json(void);
53extern PyObject* PyInit_zlib(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000054
Martin v. Löwis6a880a82008-06-11 05:48:29 +000055extern PyObject* PyInit__multibytecodec(void);
56extern PyObject* PyInit__codecs_cn(void);
57extern PyObject* PyInit__codecs_hk(void);
58extern PyObject* PyInit__codecs_iso2022(void);
59extern PyObject* PyInit__codecs_jp(void);
60extern PyObject* PyInit__codecs_kr(void);
61extern PyObject* PyInit__codecs_tw(void);
Antoine Pitrou23bba4c2012-04-18 20:51:15 +020062extern PyObject* PyInit__winapi(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000063extern PyObject* PyInit__lsprof(void);
64extern PyObject* PyInit__ast(void);
Benjamin Peterson4fa88fa2009-03-04 00:14:51 +000065extern PyObject* PyInit__io(void);
Amaury Forgeot d'Arc9d865c92008-06-12 22:27:27 +000066extern PyObject* PyInit__pickle(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000067extern PyObject* PyInit_atexit(void);
68extern PyObject* _PyWarnings_Init(void);
Georg Brandl66c221e2010-10-14 07:04:07 +000069extern PyObject* PyInit__string(void);
Christian Heimesc44ff862013-06-23 15:46:56 +020070extern PyObject* PyInit__stat(void);
Christian Heimes71135ac2013-11-24 01:11:57 +010071extern PyObject* PyInit__opcode(void);
Martin v. Löwisdaea3e52004-01-21 07:54:02 +000072
Martin v. Löwis69206522003-04-18 10:51:14 +000073/* tools/freeze/makeconfig.py marker for additional "extern" */
Guido van Rossum87d5e701996-05-28 22:50:17 +000074/* -- ADDMODULE MARKER 1 -- */
75
Martin v. Löwis6a880a82008-06-11 05:48:29 +000076extern PyObject* PyMarshal_Init(void);
77extern PyObject* PyInit_imp(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000078
Guido van Rossum2b713b21997-04-29 20:46:45 +000079struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000080
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000081 {"array", PyInit_array},
82 {"_ast", PyInit__ast},
Guido van Rossum8f81a221999-02-05 22:34:57 +000083#ifdef MS_WINDOWS
Guido van Rossum360e4b82007-05-14 22:51:27 +000084#ifndef MS_WINI64
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000085 {"audioop", PyInit_audioop},
Guido van Rossum87d5e701996-05-28 22:50:17 +000086#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000087#endif
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000088 {"binascii", PyInit_binascii},
89 {"cmath", PyInit_cmath},
90 {"errno", PyInit_errno},
Victor Stinner024e37a2011-03-31 01:31:06 +020091 {"faulthandler", PyInit_faulthandler},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000092 {"gc", PyInit_gc},
93 {"math", PyInit_math},
94 {"nt", PyInit_nt}, /* Use the NT os functions, not posix */
Antoine Pitroua85017f2013-04-20 19:21:44 +020095 {"_operator", PyInit__operator},
Brett Cannonbe9acef2014-04-04 10:36:43 -040096 {"_signal", PyInit__signal},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000097 {"_md5", PyInit__md5},
98 {"_sha1", PyInit__sha1},
99 {"_sha256", PyInit__sha256},
100 {"_sha512", PyInit__sha512},
Christian Heimes6fe2a752016-09-07 11:58:24 +0200101 {"_sha3", PyInit__sha3},
Christian Heimes7ba83372016-09-07 01:45:22 +0200102 {"_blake2", PyInit__blake2},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000103 {"time", PyInit_time},
Guido van Rossumbf57ed51996-08-22 00:43:42 +0000104#ifdef WITH_THREAD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000105 {"_thread", PyInit__thread},
Guido van Rossumbf57ed51996-08-22 00:43:42 +0000106#endif
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000107#ifdef WIN32
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000108 {"msvcrt", PyInit_msvcrt},
109 {"_locale", PyInit__locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000110#endif
Victor Stinnered3b0bc2013-11-23 12:27:24 +0100111 {"_tracemalloc", PyInit__tracemalloc},
Antoine Pitrou23bba4c2012-04-18 20:51:15 +0200112 /* XXX Should _winapi go in a WIN32 block? not WIN64? */
113 {"_winapi", PyInit__winapi},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000114
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000115 {"_codecs", PyInit__codecs},
116 {"_weakref", PyInit__weakref},
117 {"_random", PyInit__random},
118 {"_bisect", PyInit__bisect},
119 {"_heapq", PyInit__heapq},
120 {"_lsprof", PyInit__lsprof},
121 {"itertools", PyInit_itertools},
122 {"_collections", PyInit__collections},
123 {"_symtable", PyInit__symtable},
124 {"mmap", PyInit_mmap},
125 {"_csv", PyInit__csv},
126 {"_sre", PyInit__sre},
127 {"parser", PyInit_parser},
128 {"winreg", PyInit_winreg},
129 {"_struct", PyInit__struct},
Alexander Belopolskycf86e362010-07-23 19:25:47 +0000130 {"_datetime", PyInit__datetime},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000131 {"_functools", PyInit__functools},
132 {"_json", PyInit__json},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000133
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000134 {"xxsubtype", PyInit_xxsubtype},
135 {"zipimport", PyInit_zipimport},
136 {"zlib", PyInit_zlib},
137
138 /* CJK codecs */
139 {"_multibytecodec", PyInit__multibytecodec},
140 {"_codecs_cn", PyInit__codecs_cn},
141 {"_codecs_hk", PyInit__codecs_hk},
142 {"_codecs_iso2022", PyInit__codecs_iso2022},
143 {"_codecs_jp", PyInit__codecs_jp},
144 {"_codecs_kr", PyInit__codecs_kr},
145 {"_codecs_tw", PyInit__codecs_tw},
Martin v. Löwisdaea3e52004-01-21 07:54:02 +0000146
Martin v. Löwis69206522003-04-18 10:51:14 +0000147/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000148/* -- ADDMODULE MARKER 2 -- */
149
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000150 /* This module "lives in" with marshal.c */
151 {"marshal", PyMarshal_Init},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000152
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000153 /* This lives it with import.c */
Brett Cannon6f44d662012-04-15 16:08:47 -0400154 {"_imp", PyInit_imp},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000155
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000156 /* These entries are here for sys.builtin_module_names */
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000157 {"builtins", NULL},
158 {"sys", NULL},
159 {"_warnings", _PyWarnings_Init},
Georg Brandl66c221e2010-10-14 07:04:07 +0000160 {"_string", PyInit__string},
Christian Heimes33fe8092008-04-13 13:53:33 +0000161
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000162 {"_io", PyInit__io},
163 {"_pickle", PyInit__pickle},
164 {"atexit", PyInit_atexit},
Christian Heimesc44ff862013-06-23 15:46:56 +0200165 {"_stat", PyInit__stat},
Christian Heimes71135ac2013-11-24 01:11:57 +0100166 {"_opcode", PyInit__opcode},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000167
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000168 /* Sentinel */
169 {0, 0}
Guido van Rossum87d5e701996-05-28 22:50:17 +0000170};