Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-104922: MakePY_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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
methane wants to merge8 commits intopython:mainfrommethane:arg-ssize_t-by-default

Conversation

methane
Copy link
Member

@methanemethane commentedMay 25, 2023
edited
Loading

This PR keeps ABIs likePyArg_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/

@methanemethane added topic-C-API 3.13bugs and security fixes labelsMay 25, 2023
@methanemethaneforce-pushed thearg-ssize_t-by-default branch 5 times, most recently fromf1b028c tof1141a1CompareMay 25, 2023 13:13
#ifdef PY_SSIZE_T_CLEAN
# define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT
#endif

Copy link
MemberAuthor

@methanemethaneMay 25, 2023
edited
Loading

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
Copy link
MemberAuthor

@methanemethaneMay 25, 2023
edited
Loading

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);
Copy link
MemberAuthor

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, butPy_VaBuildValue is now alias to_Py_VaBuildValue_SizeT.

@methanemethaneforce-pushed thearg-ssize_t-by-default branch fromf1141a1 tob48b71aCompareMay 25, 2023 13:23
@methanemethaneforce-pushed thearg-ssize_t-by-default branch fromb48b71a to30a20f1CompareMay 25, 2023 13:26
@methanemethane marked this pull request as ready for reviewMay 25, 2023 14:29
@methanemethane marked this pull request as draftMay 30, 2023 16:54
@methanemethane deleted the arg-ssize_t-by-default branchApril 28, 2025 03:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@encukouencukouAwaiting requested review from encukouencukou will be requested when the pull request is marked ready for reviewencukou is a code owner

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently will be requested when the pull request is marked ready for reviewericsnowcurrently is a code owner

Assignees
No one assigned
Labels
3.13bugs and security fixestopic-C-API
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@methane@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp