summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/microprotocols.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite/microprotocols.c')
-rw-r--r--Modules/_sqlite/microprotocols.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c
index cf1fefd..41f0867 100644
--- a/Modules/_sqlite/microprotocols.c
+++ b/Modules/_sqlite/microprotocols.c
@@ -43,12 +43,10 @@ pysqlite_microprotocols_init(PyObject *module)
return -1;
}
- if (PyModule_AddObject(module, "adapters", psyco_adapters) < 0) {
- Py_DECREF(psyco_adapters);
- return -1;
- }
+ int res = PyModule_AddObjectRef(module, "adapters", psyco_adapters);
+ Py_DECREF(psyco_adapters);
- return 0;
+ return res;
}