-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Static PyModuleDef Objects Should be Immortal #101755
Copy link
Copy link
Open
Labels
3.12only security fixesonly security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetopic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetopic-C-APItype-featureA feature request or enhancementA feature request or enhancement
We'd likely do this via
PyModuleDef_HEAD_INIT, either directly or indirectly. The indirection might be necessary asPyModuleDef_HEAD_INITis part of the public C-API, but_PyObject_IMMORTAL_REFCNTis not.CC @eduardo-elizondo