Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 73655:2e37fc70e2dd
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Mon, 21 Nov 2011 02:49:52 +0100 |
| parents | 701165dfaae5 |
| children | a19dad38d4e8 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Mon Nov 21 02:24:49 2011 +0100 +++ b/Objects/unicodeobject.c Mon Nov 21 02:49:52 2011 +0100 @@ -4784,7 +4784,7 @@ 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 @@ 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++) {
