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

Appearance settings

gh-134043: add _PyObject_GetMethodStackRef #134044

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
Loading
from

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented May 15, 2025

@kumaraditya303 kumaraditya303 marked this pull request as ready for review May 19, 2025 14:11
@kumaraditya303 kumaraditya303 requested a review from colesbury May 20, 2025 15:43
Copy link
Contributor

@colesbury colesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a scaling test associated with this to ftscalingbench.py

if (attr != NULL) {
PyStackRef_CLEAR(*method);
*method = PyStackRef_FromPyObjectSteal(attr);
goto exit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that a return 0 instead of goto exit would make it easier to understand the code as well as see how it matches with _PyObject_GetMethod.

(Same for the goto exit statements below)

tp->tp_name, name);

_PyObject_SetAttributeErrorContext(obj, name);
PyStackRef_CLEAR(*method);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*method should always be NULL here. If it's not NULL, we exit earlier, such as through the descr != NULL case above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.