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
Prev Previous commit
Avoid long lines
  • Loading branch information
encukou committed Aug 31, 2021
commit 3a2e3fac62d3b4e94809073721079b59eb642474
12 changes: 6 additions & 6 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ new_statement_cache(pysqlite_Connection *self, int maxsize)
return NULL;
}
PyObject *lru_cache = self->state->lru_cache;
PyObject *inner = PyObject_Vectorcall(
lru_cache, args + 1, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
size_t nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET;
PyObject *inner = PyObject_Vectorcall(lru_cache, args + 1, nargsf, NULL);
Py_DECREF(args[1]);
if (inner == NULL) {
return NULL;
}

args[1] = (PyObject *)self; // Borrowed ref.
PyObject *res = PyObject_Vectorcall(
inner, args + 1, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET;
PyObject *res = PyObject_Vectorcall(inner, args + 1, nargsf, NULL);
Py_DECREF(inner);
return res;
}
Expand Down Expand Up @@ -1485,8 +1485,8 @@ pysqlite_collation_callback(
callback_context *ctx = (callback_context *)context;
assert(ctx != NULL);
PyObject *args[] = { NULL, string1, string2 }; // Borrowed refs.
retval = PyObject_Vectorcall(
ctx->callable, args + 1, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
size_t nargsf = 2 | PY_VECTORCALL_ARGUMENTS_OFFSET;
retval = PyObject_Vectorcall(ctx->callable, args + 1, nargsf, NULL);
if (retval == NULL) {
/* execution failed */
goto finally;
Expand Down
4 changes: 2 additions & 2 deletions Modules/_sqlite/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ get_statement_from_cache(pysqlite_Cursor *self, PyObject *operation)
{
PyObject *args[] = { NULL, operation, }; // Borrowed ref.
PyObject *cache = self->connection->statement_cache;
return PyObject_Vectorcall(
cache, args + 1, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
size_t nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET;
return PyObject_Vectorcall(cache, args + 1, nargsf, NULL);
}

static PyObject *
Expand Down