Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r75753:9d5b04c35d89
Date: 2015-02-07 13:21 +0100
http://bitbucket.org/pypy/pypy/changeset/9d5b04c35d89/

Log:    Don't put trigraphs in the C code, even if nowdays they seem to be
        ignored (clang gives a warning)

diff --git a/rpython/translator/c/support.py b/rpython/translator/c/support.py
--- a/rpython/translator/c/support.py
+++ b/rpython/translator/c/support.py
@@ -89,7 +89,8 @@
            ''')
 
 def _char_repr(c):
-    if c in '\\"': return '\\' + c
+    # escape with a '\' the characters '\', '"' or (for trigraphs) '?'
+    if c in '\\"?': return '\\' + c
     if ' ' <= c < '\x7F': return c
     return '\\%03o' % ord(c)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to