[issue16086] tp_flags: Undefined behaviour with 32 bits long

STINNER Victor report at bugs.python.org
Tue Oct 2 01:43:35 CEST 2012


STINNER Victor added the comment:

> tp_flags type is long, not int.

Oh, I misunderstood what MvL wrote, sorry. I missed PyType_Spec structure.

Here is an updated and more complete patch. I changed the return code of PyType_GetFlags(), instead of changing PyType_HasFeature() macro.

> OTOH, a number of the flags are not considered part of the API at all (unfortunately, they aren't explicitly excluded, either). Before we make such a change, we should really declare what flags are meant to be by an extension module, and what flags are implementation details only to be used by the object runtime itself.

Can't we decide that later? (in other issue?)

----------
Added file: http://bugs.python.org/file27380/unsigned_tp_flags-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16086>
_______________________________________


More information about the Python-bugs-list mailing list