closes bpo-32460: ensure all non-static globals have initializers (#5061)

This commit is contained in:
Benjamin Peterson 2017-12-31 10:04:13 -08:00 committed by GitHub
parent 6c6d3a4608
commit 0a37a30037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 59 deletions

View file

@ -33,7 +33,7 @@
/** the adapters registry **/
PyObject *psyco_adapters;
static PyObject *psyco_adapters = NULL;
/* pysqlite_microprotocols_init - initialize the adapters dictionary */

View file

@ -28,10 +28,6 @@
#include <Python.h>
/** adapters registry **/
extern PyObject *psyco_adapters;
/** the names of the three mandatory methods **/
#define MICROPROTOCOLS_GETQUOTED_NAME "getquoted"

View file

@ -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 *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;
int _enable_callback_tracebacks;
int pysqlite_BaseTypeAdapted;
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())
{