summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/prepare_protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite/prepare_protocol.c')
-rw-r--r--Modules/_sqlite/prepare_protocol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_sqlite/prepare_protocol.c b/Modules/_sqlite/prepare_protocol.c
index ece42f4..1f9d7b7 100644
--- a/Modules/_sqlite/prepare_protocol.c
+++ b/Modules/_sqlite/prepare_protocol.c
@@ -60,14 +60,14 @@ static PyType_Spec type_spec = {
.slots = type_slots,
};
-PyTypeObject *pysqlite_PrepareProtocolType = NULL;
-
int
pysqlite_prepare_protocol_setup_types(PyObject *module)
{
- pysqlite_PrepareProtocolType = (PyTypeObject *)PyType_FromModuleAndSpec(module, &type_spec, NULL);
- if (pysqlite_PrepareProtocolType == NULL) {
+ PyObject *type = PyType_FromModuleAndSpec(module, &type_spec, NULL);
+ if (type == NULL) {
return -1;
}
+ pysqlite_state *state = pysqlite_get_state(module);
+ state->PrepareProtocolType = (PyTypeObject *)type;
return 0;
}