summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 17:34:35 (GMT)
committerGitHub <noreply@github.com>2018-11-27 17:34:35 (GMT)
commitd4f9cf5545d6d8844e0726552ef2e366f5cc3abd (patch)
tree7aefae9861ee6b83652f6a352397b9dc145cc0d3 /Modules/_sqlite
parent1005c84535191a72ebb7587d8c5636a065b7ed79 (diff)
downloadcpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.zip
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.gz
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.bz2
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/connection.c7
-rw-r--r--Modules/_sqlite/row.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 65e8df4..b59d7d2 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -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);
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index 2fc26a8..3cfbeeb 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -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);
}