diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-03-02 01:03:11 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-03-02 01:03:11 (GMT) |
commit | f3fd733f928752c9e35f8f5141a54cd21c0993b5 (patch) | |
tree | e5ed83eca223ac5ee8a0e836dc8ee8206f89f688 /Objects/unicodeobject.c | |
parent | 6f58b6b50445be3cbebf592680bab928c4311a89 (diff) | |
download | cpython-f3fd733f928752c9e35f8f5141a54cd21c0993b5.zip cpython-f3fd733f928752c9e35f8f5141a54cd21c0993b5.tar.gz cpython-f3fd733f928752c9e35f8f5141a54cd21c0993b5.tar.bz2 |
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index cd0fccf..e4539cd 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1806,14 +1806,11 @@ PyUnicode_AsEncodedUnicode(PyObject *unicode, } PyObject * -_PyUnicode_AsDefaultEncodedString(PyObject *unicode, - const char *errors) +_PyUnicode_AsDefaultEncodedString(PyObject *unicode) { PyObject *v = ((PyUnicodeObject *)unicode)->defenc; if (v) return v; - if (errors != NULL) - Py_FatalError("non-NULL encoding in _PyUnicode_AsDefaultEncodedString"); v = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(unicode), PyUnicode_GET_SIZE(unicode), NULL); @@ -1959,7 +1956,7 @@ _PyUnicode_AsStringAndSize(PyObject *unicode, Py_ssize_t *psize) PyErr_BadArgument(); return NULL; } - bytes = _PyUnicode_AsDefaultEncodedString(unicode, NULL); + bytes = _PyUnicode_AsDefaultEncodedString(unicode); if (bytes == NULL) return NULL; if (psize != NULL) |