Issue #26687: Use Py_RETURN_NONE macro in sqlite3 module
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index ff2e3a5..7cd6d2a 100644
--- a/Modules/_sqlite/module.c
+++ b/Modules/_sqlite/module.c
@@ -139,8 +139,7 @@
PyErr_SetString(pysqlite_OperationalError, "Changing the shared_cache flag failed");
return NULL;
} else {
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
}
@@ -172,8 +171,7 @@
if (rc == -1)
return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
PyDoc_STRVAR(module_register_adapter_doc,
@@ -221,8 +219,7 @@
return NULL;
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
PyDoc_STRVAR(enable_callback_tracebacks_doc,