mirror of
https://github.com/python/cpython.git
synced 2026-03-06 04:50:58 +00:00
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
This commit is contained in:
parent
1005c84535
commit
d4f9cf5545
25 changed files with 128 additions and 122 deletions
|
|
@ -55,7 +55,7 @@ static const char * const begin_statements[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level);
|
||||
static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level, void *Py_UNUSED(ignored));
|
||||
static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self);
|
||||
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
|
|||
Py_INCREF(isolation_level);
|
||||
}
|
||||
Py_CLEAR(self->isolation_level);
|
||||
if (pysqlite_connection_set_isolation_level(self, isolation_level) < 0) {
|
||||
if (pysqlite_connection_set_isolation_level(self, isolation_level, NULL) < 0) {
|
||||
Py_DECREF(isolation_level);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -1163,7 +1163,8 @@ static PyObject* pysqlite_connection_get_in_transaction(pysqlite_Connection* sel
|
|||
Py_RETURN_FALSE;
|
||||
}
|
||||
|
||||
static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level)
|
||||
static int
|
||||
pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level, void *Py_UNUSED(ignored))
|
||||
{
|
||||
if (isolation_level == Py_None) {
|
||||
PyObject *res = pysqlite_connection_commit(self, NULL);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,8 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
|
|||
}
|
||||
}
|
||||
|
||||
Py_ssize_t pysqlite_row_length(pysqlite_Row* self, PyObject* args, PyObject* kwargs)
|
||||
static Py_ssize_t
|
||||
pysqlite_row_length(pysqlite_Row* self)
|
||||
{
|
||||
return PyTuple_GET_SIZE(self->data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue