diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-21 02:49:52 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-21 02:49:52 +0100 |
| commit | 9e30aa52fd416e17b692c4f22e57191cdd6ec654 (patch) | |
| tree | f3b1c85f5cdbb6a32ec8f309400e8d3e1c2bbfaf /Objects/unicodeobject.c | |
| parent | f3ae6208c706bae89d86df44c7c3dcac1bdcd94d (diff) | |
| download | cpython-git-9e30aa52fd416e17b692c4f22e57191cdd6ec654.tar.gz | |
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1e44357c2f..6798ef8145 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -4784,7 +4784,7 @@ _PyUnicode_AsUTF8String(PyObject *unicode, const char *errors) if (PyBytes_Check(rep)) repsize = PyBytes_GET_SIZE(rep); else - repsize = PyUnicode_GET_SIZE(rep); + repsize = PyUnicode_GET_LENGTH(rep); if (repsize > 4) { Py_ssize_t offset; @@ -8187,7 +8187,7 @@ charmap_encoding_error( Py_DECREF(repunicode); return -1; } - repsize = PyUnicode_GET_SIZE(repunicode); + repsize = PyUnicode_GET_LENGTH(repunicode); data = PyUnicode_DATA(repunicode); kind = PyUnicode_KIND(repunicode); for (index = 0; index < repsize; index++) { |
