[Python-checkins] r85770 - python/branches/py3k/Tools/scripts/h2py.py

georg.brandl python-checkins at python.org
Thu Oct 21 15:29:10 CEST 2010


Author: georg.brandl
Date: Thu Oct 21 15:29:10 2010
New Revision: 85770

Log:
#3077: fix h2py substitution of character literals.

Modified:
   python/branches/py3k/Tools/scripts/h2py.py

Modified: python/branches/py3k/Tools/scripts/h2py.py
==============================================================================
--- python/branches/py3k/Tools/scripts/h2py.py	(original)
+++ python/branches/py3k/Tools/scripts/h2py.py	Thu Oct 21 15:29:10 2010
@@ -87,7 +87,7 @@
     for p in ignores:
         body = p.sub(' ', body)
     # replace char literals by ord(...)
-    body = p_char.sub('ord(\\0)', body)
+    body = p_char.sub("ord('\\1')", body)
     # Compute negative hexadecimal constants
     start = 0
     UMAX = 2*(sys.maxsize+1)


More information about the Python-checkins mailing list