From 7459208de194db6222d7e3aa301c2b831dbe566d Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Fri, 4 Jun 2021 22:42:20 +0200 Subject: bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535) --- Modules/_sqlite/connection.c | 4 ++-- Modules/_sqlite/cursor.c | 6 +++--- Modules/_sqlite/util.c | 3 ++- Modules/_sqlite/util.h | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index e310dc3..c2f3bc0 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -432,7 +432,7 @@ pysqlite_connection_commit_impl(pysqlite_Connection *self) goto error; } - rc = pysqlite_step(statement, self); + rc = pysqlite_step(statement); if (rc != SQLITE_DONE) { _pysqlite_seterror(self->db); } @@ -482,7 +482,7 @@ pysqlite_connection_rollback_impl(pysqlite_Connection *self) goto error; } - rc = pysqlite_step(statement, self); + rc = pysqlite_step(statement); if (rc != SQLITE_DONE) { _pysqlite_seterror(self->db); } diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 7f33b3d..c2e8de5 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -568,7 +568,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation goto error; } - rc = pysqlite_step(self->statement->st, self->connection); + rc = pysqlite_step(self->statement->st); if (rc != SQLITE_DONE && rc != SQLITE_ROW) { if (PyErr_Occurred()) { /* there was an error that occurred in a user-defined callback */ @@ -773,7 +773,7 @@ pysqlite_cursor_executescript(pysqlite_Cursor *self, PyObject *script_obj) /* execute statement, and ignore results of SELECT statements */ do { - rc = pysqlite_step(statement, self->connection); + rc = pysqlite_step(statement); if (PyErr_Occurred()) { (void)sqlite3_finalize(statement); goto error; @@ -847,7 +847,7 @@ pysqlite_cursor_iternext(pysqlite_Cursor *self) } if (self->statement) { - rc = pysqlite_step(self->statement->st, self->connection); + rc = pysqlite_step(self->statement->st); if (PyErr_Occurred()) { (void)pysqlite_statement_reset(self->statement); Py_DECREF(next_row); diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index 3676935..2de819e 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -24,7 +24,8 @@ #include "module.h" #include "connection.h" -int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection) +int +pysqlite_step(sqlite3_stmt *statement) { int rc; diff --git a/Modules/_sqlite/util.h b/Modules/_sqlite/util.h index 82e5813..f308f03 100644 --- a/Modules/_sqlite/util.h +++ b/Modules/_sqlite/util.h @@ -29,7 +29,7 @@ #include "sqlite3.h" #include "connection.h" -int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection); +int pysqlite_step(sqlite3_stmt *statement); /** * Checks the SQLite error code and sets the appropriate DB-API exception. -- cgit v0.12