diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-07-20 10:59:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 10:59:18 (GMT) |
commit | 4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9 (patch) | |
tree | 4f2aa2801e9981d143d1f9a5dd543f2ea8579859 /Modules/_sqlite/module.h | |
parent | 366fcbac18e3adc41e3901580dbedb6a91e41a10 (diff) | |
download | cpython-4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9.zip cpython-4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9.tar.gz cpython-4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9.tar.bz2 |
bpo-42064: Finalise establishing sqlite3 global state (GH-27155)
With this, all sqlite3 static globals have been moved to the global state.
There are a couple of global static strings left, but there should be no need for adding them to the state.
https://bugs.python.org/issue42064
Diffstat (limited to 'Modules/_sqlite/module.h')
-rw-r--r-- | Modules/_sqlite/module.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Modules/_sqlite/module.h b/Modules/_sqlite/module.h index 7ce8381..1344490 100644 --- a/Modules/_sqlite/module.h +++ b/Modules/_sqlite/module.h @@ -41,7 +41,17 @@ typedef struct { PyObject *ProgrammingError; PyObject *Warning; + + /* A dictionary, mapping column types (INTEGER, VARCHAR, etc.) to converter + * functions, that convert the SQL value to the appropriate Python value. + * The key is uppercase. + */ + PyObject *converters; + PyObject *lru_cache; + PyObject *psyco_adapters; // The adapters registry + int BaseTypeAdapted; + int enable_callback_tracebacks; PyTypeObject *ConnectionType; PyTypeObject *CursorType; @@ -58,15 +68,6 @@ pysqlite_get_state(PyObject *Py_UNUSED(module)) return &pysqlite_global_state; } -/* A dictionary, mapping column types (INTEGER, VARCHAR, etc.) to converter - * functions, that convert the SQL value to the appropriate Python value. - * The key is uppercase. - */ -extern PyObject* _pysqlite_converters; - -extern int _pysqlite_enable_callback_tracebacks; -extern int pysqlite_BaseTypeAdapted; - #define PARSE_DECLTYPES 1 #define PARSE_COLNAMES 2 #endif |