]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)
authorErlend Egeberg Aasland <erlend.aasland@innova.no>
Fri, 4 Jun 2021 20:42:20 +0000 (22:42 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Jun 2021 20:42:20 +0000 (21:42 +0100)
Modules/_sqlite/connection.c
Modules/_sqlite/cursor.c
Modules/_sqlite/util.c
Modules/_sqlite/util.h

index e310dc3b43c5b9b1d345a8b73f77e3e3bdbdb7b8..c2f3bc0f2012509d086ce73a50cd3c80641078c6 100644 (file)
@@ -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);
         }
index 7f33b3deb30f7bceddea5de24f38dd03b427ce58..c2e8de5b6c0f00a1b9fcf6640ed8fa3d8839d0e7 100644 (file)
@@ -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);
index 3676935b9e9beb5a613d910b5fd2bb474ec68442..2de819e9e85293774ed9869e34253f1282f93d27 100644 (file)
@@ -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;
 
index 82e58139d02f9cf0cf54af079d534f1d17dae341..f308f03f71f440e70f47b496cc84521485b0ddc7 100644 (file)
@@ -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.