Mercurial > cpython-lru_cache-weakref
diff Modules/_gestalt.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 | cab14be0ada1 |
| children |
line wrap: on
line diff
--- a/Modules/_gestalt.c Mon Nov 21 02:24:49 2011 +0100 +++ b/Modules/_gestalt.c Mon Nov 21 02:49:52 2011 +0100 @@ -33,7 +33,7 @@ convert_to_OSType(PyObject *v, OSType *pr) { uint32_t tmp; - if (!PyUnicode_Check(v) || PyUnicode_GetSize(v) != 4) { + if (!PyUnicode_Check(v) || PyUnicode_GetLength(v) != 4) { PyErr_SetString(PyExc_TypeError, "OSType arg must be string of 4 chars"); return 0;
