Skip to content

Commit

Permalink
bpo-40549: Convert posixmodule.c to multiphase init (GH-19982)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vstinner committed May 10, 2020
1 parent fcb2856 commit 1c2fa78
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 129 deletions.
@@ -0,0 +1,2 @@
Convert posixmodule.c ("posix" or "nt" module) to the multiphase
initialization (PEP 489).
23 changes: 11 additions & 12 deletions Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c2fa78

Please sign in to comment.