Am 04.10.11 19:50, schrieb Antoine Pitrou: > On Tue, 04 Oct 2011 19:49:09 +0200 > "Martin v. Löwis"<martin at v.loewis.de> wrote: > >>> + result = PyUnicode_New(slicelength, PyUnicode_MAX_CHAR_VALUE(self)); >> >> This is incorrect: the maxchar of the slice might be smaller than the >> maxchar of the input string. > > I thought that heuristic would be good enough. I'll try to fix it. No - strings must always be in the canonical form. For example, PyUnicode_RichCompare considers string unequal if they have different kinds. As a consequence, your slice result may not compare equal to a canonical variant of itself.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4