8000 gh-134043: add `_PyObject_GetMethodStackRef` by kumaraditya303 · Pull Request #134044 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 8 commits into from
May 27, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pop stackref when error
  • Loading branch information
kumaraditya303 committed May 15, 2025
commit de82e900a8aee093967168c67b332a68dec9ab6e
1 change: 1 addition & 0 deletions Objects/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ PyObject_VectorcallMethod(PyObject *name, PyObject *const *args,
/* Use args[0] as "self" argument */
int unbound = _PyObject_GetMethodStackRef(tstate, args[0], name, &method.ref);
if (PyStackRef_IsNull(method.ref)) {
_PyThreadState_PopCStackRef(tstate, &method);
return NULL;
}
PyObject *callable = PyStackRef_AsPyObjectBorrow(method.ref);
Expand Down
Loading
0