mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Oops, fix my previous change on _copy_characters()
This commit is contained in:
parent
81c39a88a4
commit
24e403bbee
1 changed files with 2 additions and 2 deletions
|
@ -1254,10 +1254,10 @@ _copy_characters(PyObject *to, Py_ssize_t to_start,
|
||||||
for (i=0; i < how_many; i++) {
|
for (i=0; i < how_many; i++) {
|
||||||
ch = PyUnicode_READ(from_kind, from_data, from_start + i);
|
ch = PyUnicode_READ(from_kind, from_data, from_start + i);
|
||||||
#ifndef Py_DEBUG
|
#ifndef Py_DEBUG
|
||||||
assert(ch <= to_maxchar);
|
|
||||||
#else
|
|
||||||
if (ch > to_maxchar)
|
if (ch > to_maxchar)
|
||||||
return -1;
|
return -1;
|
||||||
|
#else
|
||||||
|
assert(ch <= to_maxchar);
|
||||||
#endif
|
#endif
|
||||||
PyUnicode_WRITE(to_kind, to_data, to_start + i, ch);
|
PyUnicode_WRITE(to_kind, to_data, to_start + i, ch);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue