diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-02-25 23:39:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 23:39:34 (GMT) |
commit | 91ea37c84af2dd5ea92802a4c2adad47861ac067 (patch) | |
tree | 1db9cbd43c1b98519926cd9f35b35c237eeac269 /Modules/_sqlite | |
parent | cc3df6368d4f3f6c9c9b716876c7e7b79c7abf3f (diff) | |
download | cpython-91ea37c84af2dd5ea92802a4c2adad47861ac067.zip cpython-91ea37c84af2dd5ea92802a4c2adad47861ac067.tar.gz cpython-91ea37c84af2dd5ea92802a4c2adad47861ac067.tar.bz2 |
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.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/util.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index 1dbabcd..0f4eba0 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -28,15 +28,9 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection) { int rc; - if (statement == NULL) { - /* this is a workaround for SQLite 3.5 and later. it now apparently - * returns NULL for "no-operation" statements */ - rc = SQLITE_OK; - } else { - Py_BEGIN_ALLOW_THREADS - rc = sqlite3_step(statement); - Py_END_ALLOW_THREADS - } + Py_BEGIN_ALLOW_THREADS + rc = sqlite3_step(statement); + Py_END_ALLOW_THREADS return rc; } |