-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-104922: Make PY_SSIZE_T_CLEAN not mandatory
#104923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f1b028c to
f1141a1
Compare
| #ifdef PY_SSIZE_T_CLEAN | ||
| # define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT | ||
| #endif | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not a part of stable ABI.
_PyObject_CallMethodId_SizeT is removed and _PyObject_CallMethodId is ssize_t version.
| const char *format, | ||
| va_list va, | ||
| Py_ssize_t *p_nargs); | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of _Py_VaBuildStack and _Py_VaBuildStack_SizeT are remained, without macro alias.
| /* Initialize event args now */ | ||
| if (argFormat && argFormat[0]) { | ||
| eventArgs = _Py_VaBuildValue_SizeT(argFormat, vargs); | ||
| eventArgs = Py_VaBuildValue(argFormat, vargs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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/