Added the const qualifier to char* variables that refer to readonly internal

UTF-8 represenatation of Unicode objects.
This commit is contained in:
Serhiy Storchaka 2016-11-20 10:16:47 +02:00
parent a98c4a984b
commit 85b0f5beb1
29 changed files with 60 additions and 61 deletions

View file

@ -1489,7 +1489,7 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args)
PyObject* retval;
Py_ssize_t i, len;
_Py_IDENTIFIER(upper);
char *uppercase_name_str;
const char *uppercase_name_str;
int rc;
unsigned int kind;
void *data;

View file

@ -79,12 +79,12 @@ PyObject* pysqlite_row_item(pysqlite_Row* self, Py_ssize_t idx)
PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
{
Py_ssize_t _idx;
char* key;
const char *key;
Py_ssize_t nitems, i;
char* compare_key;
const char *compare_key;
char* p1;
char* p2;
const char *p1;
const char *p2;
PyObject* item;

View file

@ -112,7 +112,7 @@ int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* con
int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter)
{
int rc = SQLITE_OK;
char* string;
const char *string;
Py_ssize_t buflen;
parameter_type paramtype;