mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue