mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +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
|
|
@ -65,8 +65,20 @@ static struct PyMethodDef gestalt_methods[] = {
|
|||
{NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static struct PyModuleDef gestaltmodule = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"_gestalt",
|
||||
NULL,
|
||||
-1,
|
||||
gestalt_methods,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
init_gestalt(void)
|
||||
PyInit__gestalt(void)
|
||||
{
|
||||
Py_InitModule("_gestalt", gestalt_methods);
|
||||
return PyModule_Create(&gestaltmodule);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue