Add const qualifier to strings we get from Python
This commit is contained in:
parent
92724d10ba
commit
7abfdfbf3e
|
@ -350,7 +350,7 @@ static inline long int strtoul10(const char *nptr, char **endptr) {
|
|||
static PyObject *Rocket_append_string(Rocket *self, PyObject *args)
|
||||
{
|
||||
int count;
|
||||
char *data;
|
||||
const char *data;
|
||||
int offset;
|
||||
int linenum;
|
||||
double start;
|
||||
|
@ -374,7 +374,7 @@ static PyObject *Rocket_append_string(Rocket *self, PyObject *args)
|
|||
&start, &end, &last_timestamp))
|
||||
return NULL;
|
||||
|
||||
char *buf = &data[offset];
|
||||
const char *buf = &data[offset];
|
||||
while (written < count && *buf)
|
||||
{
|
||||
linenum++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user