New submission from STINNER Victor:

"1L << 31" is undefined if long is 32 bits long. We should use unsigned long 
for PyTypeObject.tp_flags.

Attached patch implements this fix. I don't know if it breaks somehow the 
backward compatibility.

See also issues #1621 and #7406.

----------
components: Interpreter Core
files: unsigned_tp_flags.patch
keywords: patch
messages: 171574
nosy: ezio.melotti, haypo, mark.dickinson
priority: normal
severity: normal
status: open
title: tp_flags: Undefined behaviour with 32 bits long
versions: Python 3.4
Added file: http://bugs.python.org/file27347/unsigned_tp_flags.patch

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

Reply via email to