[issue45025] Reliance on C bit fields in C API is undefined behavior
Petr Viktorin
report at bugs.python.org
Mon Aug 30 11:30:43 EDT 2021
Petr Viktorin <encukou at gmail.com> added the comment:
PyUnicode_KIND does *not* expose the implementation details to the programmer.
If the internal representation os strings is switched to use masks and shifts instead of bitfields, PyUnicode_KIND (and others) can be adapted to the new details without breaking API compatibility.
And that switch would fix this issue.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45025>
_______________________________________
More information about the Python-bugs-list
mailing list