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