diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-25 17:53:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-25 17:53:18 (GMT) |
commit | 2d06e8445587d9b4d0bf79bdb08ab4743b780249 (patch) | |
tree | 9708850d5ae4855466435687cf36f162834d2694 /Modules/_sqlite | |
parent | ea8c43152fdaa508ec189062b09a470f1b4ba535 (diff) | |
download | cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.zip cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.gz cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.bz2 |
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/connection.c | 2 | ||||
-rw-r--r-- | Modules/_sqlite/cursor.c | 4 | ||||
-rw-r--r-- | Modules/_sqlite/module.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 7018f9f..75ed1f8 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1622,7 +1622,7 @@ pysqlite_connection_exit(pysqlite_Connection* self, PyObject* args) Py_RETURN_FALSE; } -static char connection_doc[] = +static const char connection_doc[] = PyDoc_STR("SQLite database connection object."); static PyGetSetDef connection_getset[] = { diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index d909738..1c240d6 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -27,7 +27,7 @@ PyObject* pysqlite_cursor_iternext(pysqlite_Cursor* self); -static char* errmsg_fetch_across_rollback = "Cursor needed to be reset because of commit/rollback and can no longer be fetched from."; +static const char errmsg_fetch_across_rollback[] = "Cursor needed to be reset because of commit/rollback and can no longer be fetched from."; static pysqlite_StatementKind detect_statement_type(const char* statement) { @@ -1050,7 +1050,7 @@ static struct PyMemberDef cursor_members[] = {NULL} }; -static char cursor_doc[] = +static const char cursor_doc[] = PyDoc_STR("SQLite database cursor class."); PyTypeObject pysqlite_CursorType = { diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 7a7e860..ff2e3a5 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -261,13 +261,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}, |