-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-104922: Make PY_SSIZE_T_CLEAN
not mandatory
#104923
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.
PyAPI_FUNC(PyObject **) _Py_VaBuildStack_SizeT( | ||
PyObject **small_stack, | ||
Py_ssize_t small_stack_len, | ||
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.
@@ -211,7 +211,7 @@ sys_audit_tstate(PyThreadState *ts, const char *event, | |||
|
|||
/* 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_T
by C macro regardlessPY_SSIZE_T_CLEAN
.📚 Documentation preview 📚: https://cpython-previews--104923.org.readthedocs.build/