mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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
This commit is contained in:
parent
366fcbac18
commit
4c0deb25ac
6 changed files with 69 additions and 53 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue