[issue9020] 2.7: eval hangs on AIX

Martin v. Löwis report at bugs.python.org
Sat Jun 19 01:02:28 CEST 2010

Martin v. Löwis <martin at v.loewis.de> added the comment:

> Does anyone know what other compilers use signed chars?

Most of them do, including gcc, on most platforms. unsigned char is really the uncommon case.

The patch is incorrect; Py_CHARMASK is correct as it stands. It is *not* the objective of Py_CHARMASK to produce a char, but (as the comment above its definition explains) to produce an int.

The question really is why you get a value of -1 into c in the first place. Could it be that you are past the end of file, and reading EOF "characters"?


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list