bpo-37483: add _PyObject_CallOneArg() function (#14558)
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index a0eb505..4b98578 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1340,8 +1340,7 @@
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 @@
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)