bpo-1635741: Port _crypt extension module to multiphase initialization (PEP 489) (GH-18404)
This commit is contained in:
parent
d83b6600b2
commit
b2b6e27bca
|
@ -0,0 +1 @@
|
||||||
|
Port _crypt extension module to multiphase initialization (:pep:`489`).
|
|
@ -54,14 +54,17 @@ static PyMethodDef crypt_methods[] = {
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static PyModuleDef_Slot _crypt_slots[] = {
|
||||||
|
{0, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
static struct PyModuleDef cryptmodule = {
|
static struct PyModuleDef cryptmodule = {
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"_crypt",
|
"_crypt",
|
||||||
NULL,
|
NULL,
|
||||||
-1,
|
0,
|
||||||
crypt_methods,
|
crypt_methods,
|
||||||
NULL,
|
_crypt_slots,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
@ -70,5 +73,5 @@ static struct PyModuleDef cryptmodule = {
|
||||||
PyMODINIT_FUNC
|
PyMODINIT_FUNC
|
||||||
PyInit__crypt(void)
|
PyInit__crypt(void)
|
||||||
{
|
{
|
||||||
return PyModule_Create(&cryptmodule);
|
return PyModuleDef_Init(&cryptmodule);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue