diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
commit | 593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch) | |
tree | c0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Python/codecs.c | |
parent | c3cb683d638e9d660c18a05293a576f98965166e (diff) | |
download | cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2 |
Renamed PyString to PyBytes
Diffstat (limited to 'Python/codecs.c')
-rw-r--r-- | Python/codecs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index 4b0f4cb..0e8cdc7 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -61,10 +61,10 @@ PyObject *normalizestring(const char *string) return NULL; } - v = PyString_FromStringAndSize(NULL, len); + v = PyBytes_FromStringAndSize(NULL, len); if (v == NULL) return NULL; - p = PyString_AS_STRING(v); + p = PyBytes_AS_STRING(v); for (i = 0; i < len; i++) { register char ch = string[i]; if (ch == ' ') @@ -112,7 +112,7 @@ PyObject *_PyCodec_Lookup(const char *encoding) v = normalizestring(encoding); if (v == NULL) goto onError; - PyString_InternInPlace(&v); + PyBytes_InternInPlace(&v); /* First, try to lookup the name in the registry dictionary */ result = PyDict_GetItem(interp->codec_search_cache, v); @@ -190,7 +190,7 @@ PyObject *args_tuple(PyObject *object, if (errors) { PyObject *v; - v = PyString_FromString(errors); + v = PyBytes_FromString(errors); if (v == NULL) { Py_DECREF(args); return NULL; @@ -451,7 +451,7 @@ static void wrong_exception_type(PyObject *exc) if (string != NULL) { PyErr_Format(PyExc_TypeError, "don't know how to handle %.400s in error callback", - PyString_AS_STRING(string)); + PyBytes_AS_STRING(string)); Py_DECREF(string); } } |