mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
closes bpo-32460: ensure all non-static globals have initializers (#5061)
This commit is contained in:
parent
6c6d3a4608
commit
0a37a30037
9 changed files with 58 additions and 59 deletions
|
@ -33,7 +33,7 @@
|
|||
|
||||
/** the adapters registry **/
|
||||
|
||||
PyObject *psyco_adapters;
|
||||
static PyObject *psyco_adapters = NULL;
|
||||
|
||||
/* pysqlite_microprotocols_init - initialize the adapters dictionary */
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue