gh-117031: Add support for new member types for PyMemberDef.type#117032
gh-117031: Add support for new member types for PyMemberDef.type#117032serhiy-storchaka wants to merge 15 commits intopython:mainfrom
Conversation
Add support for standard C and Posix integer types like Py_T_UINT32, Py_T_PTRDIFF, Py_T_OFF and Py_T_PID. Add Py_T_SSIZE as alias of Py_T_PYSSIZET.
|
!buildbot bsd |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit cf4ce29 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
|
!buildbot s390 |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit cf4ce29 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
| PyModule_AddObject(m, "SIZEOF_WCHAR_T", PyLong_FromSsize_t(sizeof(wchar_t))); | ||
| PyModule_AddObject(m, "SIZEOF_VOID_P", PyLong_FromSsize_t(sizeof(void*))); | ||
| PyModule_AddObject(m, "SIZEOF_TIME_T", PyLong_FromSsize_t(sizeof(time_t))); | ||
| PyModule_AddObject(m, "SIZEOF_INTMAX_T", PyLong_FromSsize_t(sizeof(intmax_t))); |
|
I prefer the #132550 approach -- solving this for all int types (not just C & POSIXy ones). |
| v = Py_NewRef(Py_None); | ||
| break; | ||
| case Py_T_INT8: | ||
| case Py_T_INT8|Py_T_UINT8: |
There was a problem hiding this comment.
What is this type? I don't understand the usage.
There was a problem hiding this comment.
It accepts full range of Py_T_UINT8 plus negative values.
There was a problem hiding this comment.
That's weird. Which existing code needs such type?
Add support for standard C and Posix integer types like Py_T_UINT32, Py_T_PTRDIFF, Py_T_OFF and Py_T_PID.
Add Py_T_SSIZE as alias of Py_T_PYSSIZET.
📚 Documentation preview 📚: https://cpython-previews--117032.org.readthedocs.build/