Le 06/10/2011 15:52, Antoine Pitrou a écrit : > The PyUnicode_KIND_SIZE macro is defined as follows. Its name looks > rather mysterious or misleading to me. Could we rename it to something > else? What do you propose? > also, is it useful? index << (kind - 1) and index * PyUnicode_CHARACTER_SIZE(str) were used in unicodeobject.c. It's not easy to understand this formula, and it heavily depend on how kind is defined. I wrote a patch to use enum for kind using different values, but the gain was minor so I didn't commit it. We may move it to unicodeobject.c. index * PyUnicode_CHARACTER_SIZE(str) is enough for the public API. (PyUnicode_KIND_SIZE() is also a micro-optimization, it uses shift instead of multiply.) > PEP 393 has added a flurry of new macros to > unicodeobject.h and it's getting hard to know which ones are genuinely > useful, or well-performing) Yes, we have to review new functions and macros. 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