mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-42064: Convert sqlite3 global state to module state (GH-29073)
This commit is contained in:
parent
82a662e521
commit
8f24b7dbcb
8 changed files with 36 additions and 55 deletions
|
|
@ -49,7 +49,8 @@ pysqlite_microprotocols_init(PyObject *module)
|
|||
/* pysqlite_microprotocols_add - add a reverse type-caster to the dictionary */
|
||||
|
||||
int
|
||||
pysqlite_microprotocols_add(PyTypeObject *type, PyObject *proto, PyObject *cast)
|
||||
pysqlite_microprotocols_add(pysqlite_state *state, PyTypeObject *type,
|
||||
PyObject *proto, PyObject *cast)
|
||||
{
|
||||
PyObject* key;
|
||||
int rc;
|
||||
|
|
@ -61,7 +62,6 @@ pysqlite_microprotocols_add(PyTypeObject *type, PyObject *proto, PyObject *cast)
|
|||
return -1;
|
||||
}
|
||||
|
||||
pysqlite_state *state = pysqlite_get_state(NULL);
|
||||
rc = PyDict_SetItem(state->psyco_adapters, key, cast);
|
||||
Py_DECREF(key);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue