summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
commit72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch)
treecd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /Python/import.c
parent9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff)
downloadcpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.zip
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/import.c b/Python/import.c
index 5dabd9f..31e2401 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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 *