Static PyModuleDef Objects Should be Immortal · Issue #101755 · python/cpython (original) (raw)
We'd likely do this via PyModuleDef_HEAD_INIT
, either directly or indirectly. The indirection might be necessary as PyModuleDef_HEAD_INIT
is part of the public C-API, but _PyObject_IMMORTAL_REFCNT
is not.