[issue9020] Specification of Py_CHARMASK
Stefan Krah
report at bugs.python.org
Sat Jun 19 14:24:43 CEST 2010
Stefan Krah <stefan-usenet at bytereef.org> added the comment:
You can simulate this on Linux by compiling with:
BASECFLAGS="-funsigned-char"
Then:
Index: Parser/tokenizer.c
===================================================================
--- Parser/tokenizer.c (revision 81682)
+++ Parser/tokenizer.c (working copy)
@@ -1366,6 +1366,8 @@
break;
}
while (Py_ISALNUM(c) || c == '_') {
+ c = EOF; // tok_nextc can return EOF
+ printf("c: %d\n", Py_CHARMASK(c));
c = tok_nextc(tok);
}
tok_backup(tok, c);
>>> eval("abcd")
c: -1
c: -1
c: -1
c: -1
c: -1
c: -1
Also, during compilation you get tons of warnings about using
char as an array subscript:
Objects/stringlib/split.h: In function ‘stringlib_split_whitespace’:
Objects/stringlib/split.h:70: warning: array subscript has type ‘char’
Objects/stringlib/split.h:74: warning: array subscript has type ‘char’
Objects/stringlib/split.h:91: warning: array subscript has type ‘char’
----------
title: 2.7: eval hangs on AIX -> Specification of Py_CHARMASK
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9020>
_______________________________________
More information about the Python-bugs-list
mailing list