From 0a37a30037073a4a9ba45e560c8445048e5f2ba2 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 31 Dec 2017 10:04:13 -0800 Subject: closes bpo-32460: ensure all non-static globals have initializers (#5061) --- Modules/_sqlite/module.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'Modules/_sqlite/module.c') diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 9066c32db5..879c66692b 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -35,13 +35,20 @@ /* static objects at module-level */ -PyObject* pysqlite_Error, *pysqlite_Warning, *pysqlite_InterfaceError, *pysqlite_DatabaseError, - *pysqlite_InternalError, *pysqlite_OperationalError, *pysqlite_ProgrammingError, - *pysqlite_IntegrityError, *pysqlite_DataError, *pysqlite_NotSupportedError; - -PyObject* converters; -int _enable_callback_tracebacks; -int pysqlite_BaseTypeAdapted; +PyObject *pysqlite_Error = NULL; +PyObject *pysqlite_Warning = NULL; +PyObject *pysqlite_InterfaceError = NULL; +PyObject *pysqlite_DatabaseError = NULL; +PyObject *pysqlite_InternalError = NULL; +PyObject *pysqlite_OperationalError = NULL; +PyObject *pysqlite_ProgrammingError = NULL; +PyObject *pysqlite_IntegrityError = NULL; +PyObject *pysqlite_DataError = NULL; +PyObject *pysqlite_NotSupportedError = NULL; + +PyObject* converters = NULL; +int _enable_callback_tracebacks = 0; +int pysqlite_BaseTypeAdapted = 0; static PyObject* module_connect(PyObject* self, PyObject* args, PyObject* kwargs) @@ -461,10 +468,6 @@ PyMODINIT_FUNC PyInit__sqlite3(void) /* initialize the default converters */ converters_init(dict); - _enable_callback_tracebacks = 0; - - pysqlite_BaseTypeAdapted = 0; - error: if (PyErr_Occurred()) { -- cgit v1.2.1