diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:28:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:28:38 (GMT) |
commit | 72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch) | |
tree | cd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /Modules/pyexpat.c | |
parent | 9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff) | |
download | cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.zip cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.bz2 |
Renamed PyString to PyBytes
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 852d093..fcd44c3 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -215,7 +215,7 @@ getcode(enum HandlerTypes slot, char* func_name, int lineno) PyObject *filename = NULL; if (handler_info[slot].tb_code == NULL) { - code = PyString_FromString(""); + code = PyBytes_FromString(""); if (code == NULL) goto failed; name = PyUnicode_FromString(func_name); @@ -864,8 +864,8 @@ readinst(char *buf, int buf_size, PyObject *meth) if (str == NULL) goto finally; - if (PyString_Check(str)) - ptr = PyString_AS_STRING(str); + if (PyBytes_Check(str)) + ptr = PyBytes_AS_STRING(str); else if (PyByteArray_Check(str)) ptr = PyByteArray_AS_STRING(str); else { @@ -988,7 +988,7 @@ xmlparse_GetInputContext(xmlparseobject *self, PyObject *unused) = XML_GetInputContext(self->itself, &offset, &size); if (buffer != NULL) - return PyString_FromStringAndSize(buffer + offset, + return PyBytes_FromStringAndSize(buffer + offset, size - offset); else Py_RETURN_NONE; |