STINNER Victor <vstin...@python.org> added the comment:

> In order to avoid undefined behavior, Python's C API should avoid all use of 
> bit fields.

See also the PEP 620. IMO more generally, the C API should not expose 
structures, but provide ways to access it through getter and setter functions.

See bpo-40120 "Undefined C behavior going beyond end of struct via a [1] 
arrays" which is a similar issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45025>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to