From: Georg Brandl Date: Thu, 21 Oct 2010 13:29:10 +0000 (+0000) Subject: #3077: fix h2py substitution of character literals. X-Git-Tag: v3.2a4~399 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c14f2f3437d295ea4e858103cff2197e508ef10;p=python #3077: fix h2py substitution of character literals. --- diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py index f3c80bda9c..45aa439075 100755 --- a/Tools/scripts/h2py.py +++ b/Tools/scripts/h2py.py @@ -87,7 +87,7 @@ def pytify(body): 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)