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
Next Next commit
bpo-44661: Update property_descr_set to use vectorcall if possible.
  • Loading branch information
corona10 committed Jul 17, 2021
commit a4595662f4654d2f013023045797f075b56fc1b1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update property_descr_set to use vectorcall if possible. Patch by Dong-hee
Comment thread
corona10 marked this conversation as resolved.
Outdated
Na.
8 changes: 5 additions & 3 deletions Objects/descrobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,10 +1633,12 @@ property_descr_set(PyObject *self, PyObject *obj, PyObject *value)
}
return -1;
}
if (value == NULL)
if (value == NULL) {
res = PyObject_CallOneArg(func, obj);
else
res = PyObject_CallFunctionObjArgs(func, obj, value, NULL);
} else {
Comment thread
corona10 marked this conversation as resolved.
Outdated
PyObject *args[] = { obj, value };
res = PyObject_Vectorcall(func, args, 2, NULL);
}
if (res == NULL)
return -1;
Py_DECREF(res);
Expand Down