needspeed: rpartition documentation, tests, and a bug fixes.

feel free to add more tests and improve the documentation.
This commit is contained in:
Fredrik Lundh 2006-05-26 18:24:15 +00:00
parent b3167cbcd7
commit 9c0e9c089c
3 changed files with 28 additions and 4 deletions

View file

@ -3861,8 +3861,8 @@ int PyUnicode_EncodeDecimal(Py_UNICODE *s,
Py_LOCAL(int)
STRINGLIB_CMP(const Py_UNICODE* str, const Py_UNICODE* other, Py_ssize_t len)
{
if (str[0] == other[0])
return 0;
if (str[0] != other[0])
return 1;
return memcmp((void*) str, (void*) other, len * sizeof(Py_UNICODE));
}