diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-12-31 10:04:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-31 10:04:13 -0800 |
commit | 0a37a30037073a4a9ba45e560c8445048e5f2ba2 (patch) | |
tree | 9728950510e4e4ffe0edecca86dcf305393f5a87 /Modules/_sqlite/module.c | |
parent | 6c6d3a46087bacb9c767c8cf2185505348d3796d (diff) | |
download | cpython-git-0a37a30037073a4a9ba45e560c8445048e5f2ba2.tar.gz |
closes bpo-32460: ensure all non-static globals have initializers (#5061)
Diffstat (limited to 'Modules/_sqlite/module.c')
-rw-r--r-- | Modules/_sqlite/module.c | 25 |
1 files changed, 14 insertions, 11 deletions
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()) { |