gh-104922: Make PY_SSIZE_T_CLEAN not mandatory#104923
Closed
methane wants to merge 8 commits intopython:mainfrom
Closed
gh-104922: Make PY_SSIZE_T_CLEAN not mandatory#104923methane wants to merge 8 commits intopython:mainfrom
PY_SSIZE_T_CLEAN not mandatory#104923methane wants to merge 8 commits intopython:mainfrom
Conversation
f1b028c to
f1141a1
Compare
methane
commented
May 25, 2023
| #ifdef PY_SSIZE_T_CLEAN | ||
| # define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT | ||
| #endif | ||
|
|
Member
Author
There was a problem hiding this comment.
These are not a part of stable ABI.
_PyObject_CallMethodId_SizeT is removed and _PyObject_CallMethodId is ssize_t version.
methane
commented
May 25, 2023
| const char *format, | ||
| va_list va, | ||
| Py_ssize_t *p_nargs); | ||
| #endif |
Member
Author
There was a problem hiding this comment.
Both of _Py_VaBuildStack and _Py_VaBuildStack_SizeT are remained, without macro alias.
methane
commented
May 25, 2023
| /* Initialize event args now */ | ||
| if (argFormat && argFormat[0]) { | ||
| eventArgs = _Py_VaBuildValue_SizeT(argFormat, vargs); | ||
| eventArgs = Py_VaBuildValue(argFormat, vargs); |
Member
Author
There was a problem hiding this comment.
sysmodule.c doesn't define PY_SSIZE_T_CLEAN, but Py_VaBuildValue is now alias to _Py_VaBuildValue_SizeT.
f1141a1 to
b48b71a
Compare
b48b71a to
30a20f1
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR keeps ABIs like
PyArg_Parse()raise SystemError.At API level, PyArg_Parse is always replaced to
_PyArg_Parse_Size_Tby C macro regardlessPY_SSIZE_T_CLEAN.📚 Documentation preview 📚: https://cpython-previews--104923.org.readthedocs.build/