return NULL;
/* We allocate the output same size as input, this is overkill */
- odata = (char *) calloc(1, datalen);
+ odata = (unsigned char *) calloc(1, datalen);
if (odata == NULL) {
PyErr_NoMemory();
out++;
}
}
- if ((rv = PyString_FromStringAndSize(odata, out)) == NULL) {
+ if ((rv = PyString_FromStringAndSize((char *)odata, out)) == NULL) {
free (odata);
return NULL;
}
/* XXX: this function has the side effect of converting all of
* the end of lines to be the same depending on this detection
* here */
- p = strchr(data, '\n');
+ p = (unsigned char *) strchr((char *)data, '\n');
if ((p != NULL) && (p > data) && (*(p-1) == '\r'))
crlf = 1;
}
}
- odata = (char *) calloc(1, odatalen);
+ odata = (unsigned char *) calloc(1, odatalen);
if (odata == NULL) {
PyErr_NoMemory();
}
}
}
- if ((rv = PyString_FromStringAndSize(odata, out)) == NULL) {
+ if ((rv = PyString_FromStringAndSize((char *)odata, out)) == NULL) {
free (odata);
return NULL;
}