Browse Source

Add const qualifier to strings we get from Python

tags/nilmdb-1.3.0
Jim Paris 11 years ago
parent
commit
7abfdfbf3e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      nilmdb/server/rocket.c

+ 2
- 2
nilmdb/server/rocket.c View File

@@ -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…
Cancel
Save