mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +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
|
@ -92,7 +92,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
|
|||
Py_DECREF(key);
|
||||
if (adapter) {
|
||||
Py_INCREF(adapter);
|
||||
adapted = PyObject_CallFunctionObjArgs(adapter, obj, NULL);
|
||||
adapted = _PyObject_CallOneArg(adapter, obj);
|
||||
Py_DECREF(adapter);
|
||||
return adapted;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
|
|||
return NULL;
|
||||
}
|
||||
if (adapter) {
|
||||
adapted = PyObject_CallFunctionObjArgs(adapter, obj, NULL);
|
||||
adapted = _PyObject_CallOneArg(adapter, obj);
|
||||
Py_DECREF(adapter);
|
||||
|
||||
if (adapted == Py_None) {
|
||||
|
@ -124,7 +124,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
|
|||
return NULL;
|
||||
}
|
||||
if (adapter) {
|
||||
adapted = PyObject_CallFunctionObjArgs(adapter, proto, NULL);
|
||||
adapted = _PyObject_CallOneArg(adapter, proto);
|
||||
Py_DECREF(adapter);
|
||||
|
||||
if (adapted == Py_None) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue