Le 04/10/2011 18:45, "Martin v. Löwis" a écrit : > >> Migrate str.expandtabs to the new API > > This needs > > if (PyUnicode_READY(self) == -1) > return NULL; > > right after the ParseTuple call. In most cases, the > check will be a noop. But if it's not, omitting it will > make expandtabs have no effect, since the string length > will be 0 (in a debug build, you also get an assertion > failure). This "make input string ready" code path is not well tested because all functions creating strings in unicodeobject.c ensure that the string is ready. I disabled the call to PyUnicode_READY() on result in debug mode in unicodeobject.c (define DONT_MAKE_RESULT_READY). It helped me to fix bugs in various functions, see my commit b66033a0f140. Victor
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