blob: 42a07c969456ede70694ccf9ececd8124028b9e8 [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);
Antoine Pitroua85017f2013-04-20 19:21:44 +020020extern PyObject* PyInit__operator(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000021extern 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);
Antoine Pitrou23bba4c2012-04-18 20:51:15 +020059extern PyObject* PyInit__winapi(void);
Martin v. Löwis6a880a82008-06-11 05:48:29 +000060extern 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);
Christian Heimesc44ff862013-06-23 15:46:56 +020067extern PyObject* PyInit__stat(void);
Martin v. Löwisdaea3e52004-01-21 07:54:02 +000068
Martin v. Löwis69206522003-04-18 10:51:14 +000069/* tools/freeze/makeconfig.py marker for additional "extern" */
Guido van Rossum87d5e701996-05-28 22:50:17 +000070/* -- ADDMODULE MARKER 1 -- */
71
Martin v. Löwis6a880a82008-06-11 05:48:29 +000072extern PyObject* PyMarshal_Init(void);
73extern PyObject* PyInit_imp(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000074
Guido van Rossum2b713b21997-04-29 20:46:45 +000075struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000076
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000077 {"array", PyInit_array},
78 {"_ast", PyInit__ast},
Guido van Rossum8f81a221999-02-05 22:34:57 +000079#ifdef MS_WINDOWS
Guido van Rossum360e4b82007-05-14 22:51:27 +000080#ifndef MS_WINI64
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000081 {"audioop", PyInit_audioop},
Guido van Rossum87d5e701996-05-28 22:50:17 +000082#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000083#endif
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000084 {"binascii", PyInit_binascii},
85 {"cmath", PyInit_cmath},
86 {"errno", PyInit_errno},
Victor Stinner024e37a2011-03-31 01:31:06 +020087 {"faulthandler", PyInit_faulthandler},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000088 {"gc", PyInit_gc},
89 {"math", PyInit_math},
90 {"nt", PyInit_nt}, /* Use the NT os functions, not posix */
Antoine Pitroua85017f2013-04-20 19:21:44 +020091 {"_operator", PyInit__operator},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000092 {"signal", PyInit_signal},
93 {"_md5", PyInit__md5},
94 {"_sha1", PyInit__sha1},
95 {"_sha256", PyInit__sha256},
96 {"_sha512", PyInit__sha512},
97 {"time", PyInit_time},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000098#ifdef WITH_THREAD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000099 {"_thread", PyInit__thread},
Guido van Rossumbf57ed51996-08-22 00:43:42 +0000100#endif
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000101#ifdef WIN32
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000102 {"msvcrt", PyInit_msvcrt},
103 {"_locale", PyInit__locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +0000104#endif
Antoine Pitrou23bba4c2012-04-18 20:51:15 +0200105 /* XXX Should _winapi go in a WIN32 block? not WIN64? */
106 {"_winapi", PyInit__winapi},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000107
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000108 {"_codecs", PyInit__codecs},
109 {"_weakref", PyInit__weakref},
110 {"_random", PyInit__random},
111 {"_bisect", PyInit__bisect},
112 {"_heapq", PyInit__heapq},
113 {"_lsprof", PyInit__lsprof},
114 {"itertools", PyInit_itertools},
115 {"_collections", PyInit__collections},
116 {"_symtable", PyInit__symtable},
117 {"mmap", PyInit_mmap},
118 {"_csv", PyInit__csv},
119 {"_sre", PyInit__sre},
120 {"parser", PyInit_parser},
121 {"winreg", PyInit_winreg},
122 {"_struct", PyInit__struct},
Alexander Belopolskycf86e362010-07-23 19:25:47 +0000123 {"_datetime", PyInit__datetime},
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000124 {"_functools", PyInit__functools},
125 {"_json", PyInit__json},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000126
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000127 {"xxsubtype", PyInit_xxsubtype},
128 {"zipimport", PyInit_zipimport},
129 {"zlib", PyInit_zlib},
130
131 /* CJK codecs */
132 {"_multibytecodec", PyInit__multibytecodec},
133 {"_codecs_cn", PyInit__codecs_cn},
134 {"_codecs_hk", PyInit__codecs_hk},
135 {"_codecs_iso2022", PyInit__codecs_iso2022},
136 {"_codecs_jp", PyInit__codecs_jp},
137 {"_codecs_kr", PyInit__codecs_kr},
138 {"_codecs_tw", PyInit__codecs_tw},
Martin v. Löwisdaea3e52004-01-21 07:54:02 +0000139
Martin v. Löwis69206522003-04-18 10:51:14 +0000140/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000141/* -- ADDMODULE MARKER 2 -- */
142
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000143 /* This module "lives in" with marshal.c */
144 {"marshal", PyMarshal_Init},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000145
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000146 /* This lives it with import.c */
Brett Cannon6f44d662012-04-15 16:08:47 -0400147 {"_imp", PyInit_imp},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000148
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000149 /* These entries are here for sys.builtin_module_names */
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000150 {"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},
Christian Heimesc44ff862013-06-23 15:46:56 +0200158 {"_stat", PyInit__stat},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000159
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000160 /* Sentinel */
161 {0, 0}
Guido van Rossum87d5e701996-05-28 22:50:17 +0000162};