summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/h2py.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-21 13:29:10 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-21 13:29:10 (GMT)
commit9c14f2f3437d295ea4e858103cff2197e508ef10 (patch)
tree93103a654317a88a582a5425eb0216f57dc796e0 /Tools/scripts/h2py.py
parenta847ccbeaefdd15fa093067f171605e3a5f9a866 (diff)
downloadcpython-9c14f2f3437d295ea4e858103cff2197e508ef10.zip
cpython-9c14f2f3437d295ea4e858103cff2197e508ef10.tar.gz
cpython-9c14f2f3437d295ea4e858103cff2197e508ef10.tar.bz2
#3077: fix h2py substitution of character literals.
Diffstat (limited to 'Tools/scripts/h2py.py')
-rwxr-xr-xTools/scripts/h2py.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
index f3c80bd..45aa439 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)