Py_DECREF(py_retval);
}
if (!ok) {
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
if (PyErr_Occurred()) {
*aggregate_instance = 0;
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
Py_DECREF(args);
if (!function_result) {
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
Py_DECREF(function_result);
}
if (!ok) {
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
ret = PyObject_CallFunction((PyObject*)user_arg, "issss", action, arg1, arg2, dbname, access_attempt_source);
if (ret == NULL) {
- if (_enable_callback_tracebacks)
+ if (_pysqlite_enable_callback_tracebacks)
PyErr_Print();
else
PyErr_Clear();
if (PyLong_Check(ret)) {
rc = _PyLong_AsInt(ret);
if (rc == -1 && PyErr_Occurred()) {
- if (_enable_callback_tracebacks)
+ if (_pysqlite_enable_callback_tracebacks)
PyErr_Print();
else
PyErr_Clear();
ret = _PyObject_CallNoArg((PyObject*)user_arg);
if (!ret) {
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
if (ret) {
Py_DECREF(ret);
} else {
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
return NULL;
}
- retval = PyDict_GetItem(converters, upcase_key);
+ retval = PyDict_GetItem(_pysqlite_converters, upcase_key);
Py_DECREF(upcase_key);
return retval;
if (rc != SQLITE_DONE && rc != SQLITE_ROW) {
if (PyErr_Occurred()) {
/* there was an error that occurred in a user-defined callback */
- if (_enable_callback_tracebacks) {
+ if (_pysqlite_enable_callback_tracebacks) {
PyErr_Print();
} else {
PyErr_Clear();
PyObject *pysqlite_DataError = NULL;
PyObject *pysqlite_NotSupportedError = NULL;
-PyObject* converters = NULL;
-int _enable_callback_tracebacks = 0;
+PyObject* _pysqlite_converters = NULL;
+int _pysqlite_enable_callback_tracebacks = 0;
int pysqlite_BaseTypeAdapted = 0;
static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
goto error;
}
- if (PyDict_SetItem(converters, name, callable) != 0) {
+ if (PyDict_SetItem(_pysqlite_converters, name, callable) != 0) {
goto error;
}
static PyObject* enable_callback_tracebacks(PyObject* self, PyObject* args)
{
- if (!PyArg_ParseTuple(args, "i", &_enable_callback_tracebacks)) {
+ if (!PyArg_ParseTuple(args, "i", &_pysqlite_enable_callback_tracebacks)) {
return NULL;
}
static void converters_init(PyObject* dict)
{
- converters = PyDict_New();
- if (!converters) {
+ _pysqlite_converters = PyDict_New();
+ if (!_pysqlite_converters) {
return;
}
- PyDict_SetItemString(dict, "converters", converters);
+ PyDict_SetItemString(dict, "converters", _pysqlite_converters);
}
static PyMethodDef module_methods[] = {
* functions, that convert the SQL value to the appropriate Python value.
* The key is uppercase.
*/
-extern PyObject* converters;
+extern PyObject* _pysqlite_converters;
-extern int _enable_callback_tracebacks;
+extern int _pysqlite_enable_callback_tracebacks;
extern int pysqlite_BaseTypeAdapted;
#define PARSE_DECLTYPES 1