-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
base: main
Are you sure you want to change the base?
Conversation
…thon; branch 'main' of https://github.com/python/cpython into stackref-call
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.
Please add a scaling test associated with this to ftscalingbench.py
if (attr != NULL) { | ||
PyStackRef_CLEAR(*method); | ||
*method = PyStackRef_FromPyObjectSteal(attr); | ||
goto exit; |
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.
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); |
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.
*method
should always be NULL here. If it's not NULL
, we exit earlier, such as through the descr != NULL
case above.
_PyObject_GetMethod
and calling APIs #134043