mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Implement PEP 3121: new module initialization and finalization API.
This commit is contained in:
parent
cdf94635d7
commit
1a21451b1d
113 changed files with 2230 additions and 855 deletions
|
@ -24,11 +24,11 @@ extern "C" {
|
|||
|
||||
/* -- ADDMODULE MARKER 1 -- */
|
||||
|
||||
extern void PyMarshal_Init(void);
|
||||
extern void initimp(void);
|
||||
extern void initgc(void);
|
||||
extern void init_ast(void);
|
||||
extern void _PyWarnings_Init(void);
|
||||
extern PyObject* PyMarshal_Init(void);
|
||||
extern PyObject* PyInit_imp(void);
|
||||
extern PyObject* PyInit_gc(void);
|
||||
extern PyObject* PyInit__ast(void);
|
||||
extern PyObject* _PyWarnings_Init(void);
|
||||
|
||||
struct _inittab _PyImport_Inittab[] = {
|
||||
|
||||
|
@ -38,10 +38,10 @@ struct _inittab _PyImport_Inittab[] = {
|
|||
{"marshal", PyMarshal_Init},
|
||||
|
||||
/* This lives in import.c */
|
||||
{"imp", initimp},
|
||||
{"imp", PyInit_imp},
|
||||
|
||||
/* This lives in Python/Python-ast.c */
|
||||
{"_ast", init_ast},
|
||||
{"_ast", PyInit__ast},
|
||||
|
||||
/* These entries are here for sys.builtin_module_names */
|
||||
{"__main__", NULL},
|
||||
|
@ -49,7 +49,7 @@ struct _inittab _PyImport_Inittab[] = {
|
|||
{"sys", NULL},
|
||||
|
||||
/* This lives in gcmodule.c */
|
||||
{"gc", initgc},
|
||||
{"gc", PyInit_gc},
|
||||
|
||||
/* This lives in _warnings.c */
|
||||
{"_warnings", _PyWarnings_Init},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue