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

@ -1322,10 +1322,10 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
if (v == NULL)
return NULL;
}
if (!PyString_Check(v))
if (!PyBytes_Check(v))
continue;
base = PyString_AS_STRING(v);
size = PyString_GET_SIZE(v);
base = PyBytes_AS_STRING(v);
size = PyBytes_GET_SIZE(v);
len = size;
if (len + 2 + namelen + MAXSUFFIXSIZE >= buflen) {
continue; /* Too long */
@ -2385,7 +2385,7 @@ ensure_fromlist(PyObject *mod, PyObject *fromlist, char *buf, Py_ssize_t buflen,
PyErr_SetString(PyExc_ValueError, "Cannot encode path item");
return 0;
}
subname = PyString_AS_STRING(item8);
subname = PyBytes_AS_STRING(item8);
if (buflen + strlen(subname) >= MAXPATHLEN) {
PyErr_SetString(PyExc_ValueError,
"Module name too long");
@ -2691,7 +2691,7 @@ imp_get_magic(PyObject *self, PyObject *noargs)
buf[2] = (char) ((pyc_magic >> 16) & 0xff);
buf[3] = (char) ((pyc_magic >> 24) & 0xff);
return PyString_FromStringAndSize(buf, 4);
return PyBytes_FromStringAndSize(buf, 4);
}
static PyObject *