mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-37483: add _PyObject_CallOneArg() function (#14558)
This commit is contained in:
parent
9d40554e0d
commit
196a530e00
44 changed files with 128 additions and 146 deletions
|
@ -1340,8 +1340,7 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PyObject *args[1] = {obj};
|
||||
return _PyObject_FastCall(gs->prop_get, args, 1);
|
||||
return _PyObject_CallOneArg(gs->prop_get, obj);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1362,7 +1361,7 @@ property_descr_set(PyObject *self, PyObject *obj, PyObject *value)
|
|||
return -1;
|
||||
}
|
||||
if (value == NULL)
|
||||
res = PyObject_CallFunctionObjArgs(func, obj, NULL);
|
||||
res = _PyObject_CallOneArg(func, obj);
|
||||
else
|
||||
res = PyObject_CallFunctionObjArgs(func, obj, value, NULL);
|
||||
if (res == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue