Renamed PyString to PyBytes

This commit is contained in:
Christian Heimes 2008-05-26 13:28:38 +00:00
parent 9c4756ea26
commit 72b710a596
78 changed files with 983 additions and 983 deletions

View file

@ -708,9 +708,9 @@ mmap_subscript(mmap_object *self, PyObject *item)
}
if (slicelen <= 0)
return PyString_FromStringAndSize("", 0);
return PyBytes_FromStringAndSize("", 0);
else if (step == 1)
return PyString_FromStringAndSize(self->data + start,
return PyBytes_FromStringAndSize(self->data + start,
slicelen);
else {
char *result_buf = (char *)PyMem_Malloc(slicelen);
@ -723,7 +723,7 @@ mmap_subscript(mmap_object *self, PyObject *item)
cur += step, i++) {
result_buf[i] = self->data[cur];
}
result = PyString_FromStringAndSize(result_buf,
result = PyBytes_FromStringAndSize(result_buf,
slicelen);
PyMem_Free(result_buf);
return result;