Skip to content

Commit

Permalink
bpo-1635741: port scproxy to multi-phase init (pythonGH-22164)
Browse files Browse the repository at this point in the history
  • Loading branch information
koubaa authored Sep 9, 2020
1 parent 58de1dd commit 3ff6975
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Port the :mod:`_scproxy` extension module to multi-phase initialization
(:pep:`489`).
22 changes: 9 additions & 13 deletions Modules/_scproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,32 +231,28 @@ static PyMethodDef mod_methods[] = {
{ 0, 0, 0, 0 }
};

static PyModuleDef_Slot _scproxy_slots[] = {
{0, NULL}
};


static struct PyModuleDef mod_module = {
static struct PyModuleDef _scproxy_module = {
PyModuleDef_HEAD_INIT,
"_scproxy",
NULL,
-1,
mod_methods,
NULL,
NULL,
NULL,
NULL
.m_name = "_scproxy",
.m_size = 0,
.m_methods = mod_methods,
.m_slots = _scproxy_slots,
};


#ifdef __cplusplus
extern "C" {
#endif

PyMODINIT_FUNC
PyInit__scproxy(void)
{
return PyModule_Create(&mod_module);
return PyModuleDef_Init(&_scproxy_module);
}

#ifdef __cplusplus
}
#endif

0 comments on commit 3ff6975

Please sign in to comment.