From 9c14f2f3437d295ea4e858103cff2197e508ef10 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 21 Oct 2010 13:29:10 +0000 Subject: [PATCH] #3077: fix h2py substitution of character literals. --- Tools/scripts/h2py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.40.0