bpo-42064: Optimise sqlite3 state access, part 1 (GH-27273)

Prepare for module state:

- Add "get state by defining class" and "get state by module def" stubs
- Add AC defining class when needed
- Add state pointer to connection context
- Pass state as argument to utility functions

Automerge-Triggered-By: GH:encukou
This commit is contained in:
Erlend Egeberg Aasland 2021-07-29 11:21:45 +02:00 committed by GitHub
parent 47fd4726a2
commit d542742128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 103 additions and 66 deletions

View file

@ -35,7 +35,7 @@ int pysqlite_step(sqlite3_stmt *statement);
* Checks the SQLite error code and sets the appropriate DB-API exception.
* Returns the error code (0 means no error occurred).
*/
int _pysqlite_seterror(sqlite3 *db);
int _pysqlite_seterror(pysqlite_state *state, sqlite3 *db);
sqlite_int64 _pysqlite_long_as_int64(PyObject * value);