8000 bpo-43290: Remove workaround from pysqlite_step() (GH-24638) · python/cpython@91ea37c · GitHub
[go: up one dir, main page]

Skip to content

Commit 91ea37c

Browse files
author
Erlend Egeberg Aasland
authored
bpo-43290: Remove workaround from pysqlite_step() (GH-24638)
From the SQLite 3.5.3 changelog: sqlite3_step() returns SQLITE_MISUSE instead of crashing when called with a NULL parameter. The workaround no longer needed because we no longer support SQLite releases older than 3.7.15.
1 parent cc3df63 commit 91ea37c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Modules/_sqlite/util.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection)
2828
{
2929
int rc;
3030

31-
if (statement == NULL) {
32-
/* this is a workaround for SQLite 3.5 and later. it now apparently
33-
* returns NULL for "no-operation" statements */
34-
rc = SQLITE_OK;
35-
} else {
36-
Py_BEGIN_ALLOW_THREADS
37-
rc = sqlite3_step(statement);
38-
Py_END_ALLOW_THREADS
39-
}
31+
Py_BEGIN_ALLOW_THREADS
32+
rc = sqlite3_step(statement);
33+
Py_END_ALLOW_THREADS
4034

4135
return rc;
4236
}

0 commit comments

Comments
 (0)
0