Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.

This commit is contained in:
Martin v. Löwis 2011-10-07 20:55:35 +02:00
parent dd07732af5
commit c47adb04b3
8 changed files with 84 additions and 123 deletions

View file

@ -30,5 +30,5 @@ unicode_eq(PyObject *aa, PyObject *bb)
PyUnicode_GET_LENGTH(a) == 1)
return 1;
return memcmp(PyUnicode_1BYTE_DATA(a), PyUnicode_1BYTE_DATA(b),
PyUnicode_GET_LENGTH(a) * PyUnicode_CHARACTER_SIZE(a)) == 0;
PyUnicode_GET_LENGTH(a) * PyUnicode_KIND(a)) == 0;
}