mirror of
https://github.com/python/cpython.git
synced 2025-09-18 14:40:43 +00:00
needspeed: rpartition documentation, tests, and a bug fixes.
feel free to add more tests and improve the documentation.
This commit is contained in:
parent
b3167cbcd7
commit
9c0e9c089c
3 changed files with 28 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue