summaryrefslogtreecommitdiff
path: root/Modules/_sqlite/module.c
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2016-07-17 14:12:59 +0200
committerStefan Krah <skrah@bytereef.org>2016-07-17 14:12:59 +0200
commit5482ab1b94bd1679fb491c1195e6f0757afab4d4 (patch)
tree93dd61331f9f49648394ea1d6b02856604ae6e82 /Modules/_sqlite/module.c
parent47bf84d959f87af22da5c325a67a6b0b89dd9a77 (diff)
parent9eb921ecf5483ed903332ec829264bcf38aeb5f5 (diff)
downloadcpython-5482ab1b94bd1679fb491c1195e6f0757afab4d4.tar.gz
Merge 3.5.
Diffstat (limited to 'Modules/_sqlite/module.c')
-rw-r--r--Modules/_sqlite/module.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index 7a7e86040a..7cd6d2abeb 100644
--- a/Modules/_sqlite/module.c
+++ b/Modules/_sqlite/module.c
@@ -139,8 +139,7 @@ static PyObject* module_enable_shared_cache(PyObject* self, PyObject* args, PyOb
PyErr_SetString(pysqlite_OperationalError, "Changing the shared_cache flag failed");
return NULL;
} else {
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
}
@@ -172,8 +171,7 @@ static PyObject* module_register_adapter(PyObject* self, PyObject* args)
if (rc == -1)
return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
PyDoc_STRVAR(module_register_adapter_doc,
@@ -221,8 +219,7 @@ static PyObject* enable_callback_tracebacks(PyObject* self, PyObject* args)
return NULL;
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
PyDoc_STRVAR(enable_callback_tracebacks_doc,
@@ -261,13 +258,13 @@ static PyMethodDef module_methods[] = {
};
struct _IntConstantPair {
- char* constant_name;
+ const char *constant_name;
int constant_value;
};
typedef struct _IntConstantPair IntConstantPair;
-static IntConstantPair _int_constants[] = {
+static const IntConstantPair _int_constants[] = {
{"PARSE_DECLTYPES", PARSE_DECLTYPES},
{"PARSE_COLNAMES", PARSE_COLNAMES},