Stefan Krah <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue9020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com