Skip to content

Commit 1c2fa78

Browse files
authored
bpo-40549: Convert posixmodule.c to multiphase init (GH-19982)
Convert posixmodule.c ("posix" or "nt" module) to the multiphase initialization (PEP 489). * Create the module using PyModuleDef_Init(). * Create ScandirIteratorType and DirEntryType with the new PyType_FromModuleAndSpec() (PEP 573) * Get the module state from ScandirIteratorType and DirEntryType with the new PyType_GetModule() (PEP 573) * Pass module to functions which access the module state. * convert_sched_param() gets a new module parameter. It is now called directly since Argument Clinic doesn't support passing the module to an argument converter callback. * Remove _posixstate_global macro.
1 parent fcb2856 commit 1c2fa78

File tree

3 files changed

+147
-129
lines changed

3 files changed

+147
-129
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Convert posixmodule.c ("posix" or "nt" module) to the multiphase
2+
initialization (PEP 489).

Modules/clinic/posixmodule.c.h

+11-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)