File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change
1
+ Port the :mod: `_scproxy ` extension module to multi-phase initialization
2
+ (:pep: `489 `).
Original file line number Diff line number Diff line change @@ -231,32 +231,28 @@ static PyMethodDef mod_methods[] = {
231
231
{ 0 , 0 , 0 , 0 }
232
232
};
233
233
234
+ static PyModuleDef_Slot _scproxy_slots [] = {
235
+ {0 , NULL }
236
+ };
234
237
235
-
236
- static struct PyModuleDef mod_module = {
238
+ static struct PyModuleDef _scproxy_module = {
237
239
PyModuleDef_HEAD_INIT ,
238
- "_scproxy" ,
239
- NULL ,
240
- -1 ,
241
- mod_methods ,
242
- NULL ,
243
- NULL ,
244
- NULL ,
245
- NULL
240
+ .m_name = "_scproxy" ,
241
+ .m_size = 0 ,
242
+ .m_methods = mod_methods ,
243
+ .m_slots = _scproxy_slots ,
246
244
};
247
245
248
-
249
246
#ifdef __cplusplus
250
247
extern "C" {
251
248
#endif
252
249
253
250
PyMODINIT_FUNC
254
251
PyInit__scproxy (void )
255
252
{
256
- return PyModule_Create ( & mod_module );
253
+ return PyModuleDef_Init ( & _scproxy_module );
257
254
}
258
255
259
256
#ifdef __cplusplus
260
257
}
261
258
#endif
262
-
You can’t perform that action at this time.
0 commit comments