mirror of
https://github.com/python/cpython.git
synced 2026-05-22 04:13:22 -04:00
c2504931ee
_PyUnicode_AsDefaultEncodedString() at all -- this saves two object allocations (three block allocations!) and lots of redundant work. By using the same hash algorithm as string_hash(), we maintain the invariant that the hash of an ASCII string is the same whether represented as a PyString or a PyUnicode.