mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -112,9 +112,8 @@ void pysqlite_cache_dealloc(pysqlite_Cache* self)
|
|||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
||||
PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* args)
|
||||
PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key)
|
||||
{
|
||||
PyObject* key = args;
|
||||
pysqlite_Node* node;
|
||||
pysqlite_Node* ptr;
|
||||
PyObject* data;
|
||||
|
@ -184,6 +183,9 @@ PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* args)
|
|||
}
|
||||
}
|
||||
|
||||
/* We cannot replace this by _PyObject_CallOneArg() since
|
||||
* PyObject_CallFunction() has a special case when using a
|
||||
* single tuple as argument. */
|
||||
data = PyObject_CallFunction(self->factory, "O", key);
|
||||
|
||||
if (!data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue