Skip to content
Merged
Show file tree
Hide file tree
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
Apply suggestions from code review
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
  • Loading branch information
carljm and corona10 authored Apr 14, 2023
commit 775ed0feeac0a004cb236bc7ae68868e8bc270e3
5 changes: 3 additions & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -9406,7 +9406,8 @@ do_super_lookup(superobject *su, PyTypeObject *su_type, PyObject *su_obj,
Py_INCREF(res);
if (meth_found && _PyType_HasFeature(Py_TYPE(res), Py_TPFLAGS_METHOD_DESCRIPTOR)) {
*meth_found = 1;
} else {
}
else {
descrgetfunc f = Py_TYPE(res)->tp_descr_get;
if (f != NULL) {
PyObject *res2;
Expand All @@ -9433,7 +9434,7 @@ do_super_lookup(superobject *su, PyTypeObject *su_type, PyObject *su_obj,

skip:
if (su == NULL) {
su = (superobject *)PyObject_Vectorcall((PyObject *)&PySuper_Type, NULL, 0, NULL);
su = (superobject *)PyObject_CallNoArgs((PyObject *)&PySuper_Type);
if (su == NULL) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ dummy_func(
} else {
PyObject *super;
if (oparg & 2) {
super = PyObject_Vectorcall(global_super, NULL, 0, NULL);
super = PyObject_CallNoArgs(global_super);
} else {
PyObject *stack[] = {class, self};
super = PyObject_Vectorcall(global_super, stack, 2, NULL);
Expand Down