You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following optimisations can be applied to _pysqlite_connection_begin():
Return an int instead of a PyObject pointer
Per now, we do Py_RETURN_NONE and Py_DECREF(result) if _pysqlite_connection_begin() was successful (normally the case). There's no reason to do this. Let's just it the C way: return -1 on error and 0 if things are ok.
Defer error checking till post sqlite3_finalize()
Any error code returned by sqlite3_step() will also be returned by sqlite3_finalize() for the same statement. From the SQLite docs:
"If the most recent evaluation of statement S failed, then sqlite3_finalize(S) returns the appropriate error code or extended error code."
The single use is in _pysqlite_query_execute() in cursor.c. Moving it makes it possible for the compiler to apply more optimisations. At least so I've heard :)
(As a side effect, the namespace will be cleaner.)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: