summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/statement.c
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-07-20 10:59:18 (GMT)
committerGitHub <noreply@github.com>2021-07-20 10:59:18 (GMT)
commit4c0deb25ac899fbe4da626ce3cb21f204cdd3aa9 (patch)
tree4f2aa2801e9981d143d1f9a5dd543f2ea8579859 /Modules/_sqlite/statement.c
parent366fcbac18e3adc41e3901580dbedb6a91e41a10 (diff)
downloadcpython-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/statement.c')
-rw-r--r--Modules/_sqlite/statement.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index cca8616..8add509 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -211,7 +211,8 @@ final:
/* returns 0 if the object is one of Python's internal ones that don't need to be adapted */
static int _need_adapt(PyObject* obj)
{
- if (pysqlite_BaseTypeAdapted) {
+ pysqlite_state *state = pysqlite_get_state(NULL);
+ if (state->BaseTypeAdapted) {
return 1;
}