[issue9020] 2.7: eval hangs on AIX

Sridhar Ratnakumar report at bugs.python.org
Fri Jun 18 00:08:31 CEST 2010


Sridhar Ratnakumar <sridharr at activestate.com> added the comment:

Py_CHARMASK(c) = 4294967295

And I think I found the problem: from Include/Python.h

/* Convert a possibly signed character to a nonnegative int */
/* XXX This assumes characters are 8 bits wide */
#ifdef __CHAR_UNSIGNED__
#define Py_CHARMASK(c)		(c)
#else
#define Py_CHARMASK(c)		((unsigned char)((c) & 0xff))
#endif

__CHAR_UNSIGNED__ is defined to 1, but when I printed the value of sizeof(c) in the above while loop, it printed 4. Therefore .. c is 32 bits side.

----------

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


More information about the Python-bugs-list mailing list