Skip to content

Commit d59145b

Browse files
make bound methods work for keyword calls as well
1 parent c6be5aa commit d59145b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3717,10 +3717,10 @@ dummy_func(
37173717
PyObject *self = ((PyMethodObject *)callable)->im_self;
37183718
args[0] = Py_NewRef_StackRef(Py_STACKREF_TAG(self));
37193719
PyObject *method = ((PyMethodObject *)callable)->im_func;
3720-
args[-1] = Py_NewRef_StackRef(Py_STACKREF_TAG(method));
3720+
args[-1] = Py_NewRef_StackRef(Py_STACKREF_TAG_DEFERRED(method));
37213721
Py_DECREF_STACKREF(callable_tagged);
37223722
callable = method;
3723-
callable_tagged = Py_STACKREF_TAG(method);
3723+
callable_tagged = args[-1];
37243724
}
37253725
int positional_args = total_args - (int)PyTuple_GET_SIZE(kwnames);
37263726
// Check if the call can be inlined or not

Python/generated_cases.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)