bpo-40024: Add PyModule_AddType() helper function#19088
bpo-40024: Add PyModule_AddType() helper function#19088vstinner merged 6 commits intopython:masterfrom
Conversation
vstinner
left a comment
There was a problem hiding this comment.
IMHO such helper function deserves to be added to the limited C API. I know that I said the opposite a few days ago ;-) But now I can review its implementation and how it's used in practice ;-)
Modules/_weakref.c would also benefit of this helper function. Well, I get that almost all C extension would benefit of this helper. But let's start with the current PR + _weakref, and then write a second PR to convert all other C extension to PyModule_AddType() at once.
vstinner
left a comment
There was a problem hiding this comment.
Can you please rename _PyModule_AddType to PyModule_AddType() to make it public? Names starting with _Py are private functions.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. Just a last request on the documentation.
Co-Authored-By: Victor Stinner <[email protected]>
|
@vstinner |
|
Merged, thanks. |
https://bugs.python.org/issue40024