From 72b710a59617ebe6dd1c41613d2c7eb81702efd9 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 26 May 2008 13:28:38 +0000 Subject: Renamed PyString to PyBytes --- Python/import.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Python/import.c') diff --git a/Python/import.c b/Python/import.c index 5dabd9f643..31e2401fe8 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 * -- cgit v1.2.1