[issue44099] [C API] Introduce a new slot in PyModuleDef to hold the classes

Shreyan Avigyan report at bugs.python.org
Thu May 20 08:30:15 EDT 2021


Shreyan Avigyan <shreyan.avigyan at gmail.com> added the comment:

I'm not sure if bpo-42376 is same as this one. Yes the basic idea to provide abstraction and make it easy for the users to add type is same but the approaches suggested are completely different. I propose a new structure member in PyModuleDef be added where we can just specify the address of the types and then in PyModule_Create add those automatically and set the member back to NULL. This will not be a performance improvement just an enhancement to allow adding types more easily. The only thing I'm concerned about is that will it break the Stable ABI? It'll not break C extensions though.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44099>
_______________________________________


More information about the Python-bugs-list mailing list