]>
Commit | Line | Data |
---|---|---|
41b152c5 | 1 | /** @file\r |
2 | Python Module configuration.\r | |
3 | \r | |
4 | Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials are licensed and made available under\r | |
6 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | **/\r | |
006fecd5 | 13 | \r |
14 | /* This file contains the table of built-in modules.\r | |
15 | See init_builtin() in import.c. */\r | |
16 | \r | |
17 | #include "Python.h"\r | |
18 | \r | |
19 | extern void initarray(void);\r | |
41b152c5 | 20 | #ifndef MS_WINI64\r |
21 | extern void initaudioop(void);\r | |
22 | #endif\r | |
006fecd5 | 23 | extern void initbinascii(void);\r |
24 | extern void initcmath(void);\r | |
25 | extern void initerrno(void);\r | |
26 | extern void initfuture_builtins(void);\r | |
27 | extern void initgc(void);\r | |
28 | #ifndef MS_WINI64\r | |
29 | extern void initimageop(void);\r | |
30 | #endif\r | |
31 | extern void initmath(void);\r | |
32 | extern void init_md5(void);\r | |
33 | extern void initnt(void);\r | |
34 | extern void initoperator(void);\r | |
35 | extern void initsignal(void);\r | |
36 | extern void init_sha(void);\r | |
37 | extern void init_sha256(void);\r | |
38 | extern void init_sha512(void);\r | |
39 | extern void initstrop(void);\r | |
40 | extern void inittime(void);\r | |
41b152c5 | 41 | extern void initthread(void);\r |
006fecd5 | 42 | extern void initcStringIO(void);\r |
43 | extern void initcPickle(void);\r | |
44 | #ifdef WIN32\r | |
45 | extern void initmsvcrt(void);\r | |
46 | extern void init_locale(void);\r | |
47 | #endif\r | |
48 | extern void init_codecs(void);\r | |
49 | extern void init_weakref(void);\r | |
50 | extern void init_hotshot(void);\r | |
51 | extern void initxxsubtype(void);\r | |
41b152c5 | 52 | extern void initzipimport(void);\r |
006fecd5 | 53 | extern void init_random(void);\r |
54 | extern void inititertools(void);\r | |
55 | extern void init_collections(void);\r | |
56 | extern void init_heapq(void);\r | |
57 | extern void init_bisect(void);\r | |
58 | extern void init_symtable(void);\r | |
41b152c5 | 59 | extern void initmmap(void);\r |
006fecd5 | 60 | extern void init_csv(void);\r |
61 | extern void init_sre(void);\r | |
62 | extern void initparser(void);\r | |
41b152c5 | 63 | extern void init_winreg(void);\r |
006fecd5 | 64 | extern void init_struct(void);\r |
65 | extern void initdatetime(void);\r | |
66 | extern void init_functools(void);\r | |
67 | extern void init_json(void);\r | |
41b152c5 | 68 | extern void initzlib(void);\r |
006fecd5 | 69 | \r |
70 | extern void init_multibytecodec(void);\r | |
71 | extern void init_codecs_cn(void);\r | |
72 | extern void init_codecs_hk(void);\r | |
73 | extern void init_codecs_iso2022(void);\r | |
74 | extern void init_codecs_jp(void);\r | |
75 | extern void init_codecs_kr(void);\r | |
76 | extern void init_codecs_tw(void);\r | |
41b152c5 | 77 | extern void init_subprocess(void);\r |
78 | extern void init_lsprof(void);\r | |
006fecd5 | 79 | extern void init_ast(void);\r |
80 | extern void init_io(void);\r | |
81 | extern void _PyWarnings_Init(void);\r | |
82 | \r | |
83 | /* tools/freeze/makeconfig.py marker for additional "extern" */\r | |
84 | /* -- ADDMODULE MARKER 1 -- */\r | |
85 | \r | |
86 | extern void PyMarshal_Init(void);\r | |
87 | extern void initimp(void);\r | |
88 | \r | |
89 | struct _inittab _PyImport_Inittab[] = {\r | |
90 | \r | |
91 | {"array", initarray},\r | |
92 | {"_ast", init_ast},\r | |
41b152c5 | 93 | #ifdef MS_WINDOWS\r |
94 | #ifndef MS_WINI64\r | |
95 | {"audioop", initaudioop},\r | |
96 | #endif\r | |
97 | #endif\r | |
006fecd5 | 98 | {"binascii", initbinascii},\r |
99 | //{"cmath", initcmath},\r | |
100 | {"errno", initerrno},\r | |
41b152c5 | 101 | \r |
006fecd5 | 102 | {"gc", initgc},\r |
41b152c5 | 103 | {"signal", initsignal},\r |
104 | \r | |
105 | #if 0\r | |
106 | {"future_builtins", initfuture_builtins},\r | |
006fecd5 | 107 | #ifndef MS_WINI64\r |
108 | {"imageop", initimageop},\r | |
109 | #endif\r | |
110 | {"math", initmath},\r | |
111 | {"_md5", init_md5},\r | |
112 | //{"nt", initnt}, /* Use the NT os functions, not posix */\r | |
113 | {"operator", initoperator},\r | |
006fecd5 | 114 | {"_sha", init_sha},\r |
115 | {"_sha256", init_sha256},\r | |
116 | {"_sha512", init_sha512},\r | |
117 | {"strop", initstrop},\r | |
118 | {"time", inittime},\r | |
119 | #ifdef WITH_THREAD\r | |
120 | {"thread", initthread},\r | |
121 | #endif\r | |
122 | {"cStringIO", initcStringIO},\r | |
123 | {"cPickle", initcPickle},\r | |
124 | #ifdef WIN32\r | |
125 | {"msvcrt", initmsvcrt},\r | |
126 | {"_locale", init_locale},\r | |
127 | #endif\r | |
128 | /* XXX Should _subprocess go in a WIN32 block? not WIN64? */\r | |
129 | //{"_subprocess", init_subprocess},\r | |
130 | \r | |
131 | {"_codecs", init_codecs},\r | |
132 | //{"_weakref", init_weakref},\r | |
133 | //{"_hotshot", init_hotshot},\r | |
134 | {"_random", init_random},\r | |
135 | {"_bisect", init_bisect},\r | |
136 | {"_heapq", init_heapq},\r | |
137 | //{"_lsprof", init_lsprof},\r | |
138 | {"itertools", inititertools},\r | |
139 | {"_collections", init_collections},\r | |
140 | {"_symtable", init_symtable},\r | |
141 | //{"mmap", initmmap},\r | |
142 | {"_csv", init_csv},\r | |
143 | {"_sre", init_sre},\r | |
41b152c5 | 144 | #endif\r |
145 | \r | |
006fecd5 | 146 | {"parser", initparser},\r |
41b152c5 | 147 | \r |
148 | #if 0\r | |
006fecd5 | 149 | //{"_winreg", init_winreg},\r |
150 | {"_struct", init_struct},\r | |
41b152c5 | 151 | {"datetime", initdatetime},\r |
006fecd5 | 152 | {"_functools", init_functools},\r |
153 | {"_json", init_json},\r | |
154 | \r | |
155 | {"xxsubtype", initxxsubtype},\r | |
156 | //{"zipimport", initzipimport},\r | |
157 | //{"zlib", initzlib},\r | |
158 | \r | |
159 | /* CJK codecs */\r | |
160 | {"_multibytecodec", init_multibytecodec},\r | |
161 | {"_codecs_cn", init_codecs_cn},\r | |
162 | {"_codecs_hk", init_codecs_hk},\r | |
163 | {"_codecs_iso2022", init_codecs_iso2022},\r | |
164 | {"_codecs_jp", init_codecs_jp},\r | |
165 | {"_codecs_kr", init_codecs_kr},\r | |
166 | {"_codecs_tw", init_codecs_tw},\r | |
41b152c5 | 167 | #endif\r |
006fecd5 | 168 | \r |
169 | /* tools/freeze/makeconfig.py marker for additional "_inittab" entries */\r | |
170 | /* -- ADDMODULE MARKER 2 -- */\r | |
171 | \r | |
172 | /* This module "lives in" with marshal.c */\r | |
173 | {"marshal", PyMarshal_Init},\r | |
174 | \r | |
41b152c5 | 175 | /* This lives in with import.c */\r |
006fecd5 | 176 | {"imp", initimp},\r |
177 | \r | |
178 | /* These entries are here for sys.builtin_module_names */\r | |
179 | {"__main__", NULL},\r | |
180 | {"__builtin__", NULL},\r | |
181 | {"sys", NULL},\r | |
182 | {"exceptions", NULL},\r | |
183 | {"_warnings", _PyWarnings_Init},\r | |
184 | \r | |
185 | {"_io", init_io},\r | |
186 | \r | |
187 | /* Sentinel */\r | |
188 | {0, 0}\r | |
189 | };\r |