Mercurial > cpython-lru_cache-weakref
diff Tools/scripts/h2py.py @ 65573:a2bb50ffdff3
#3077: fix h2py substitution of character literals.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Thu, 21 Oct 2010 13:29:10 +0000 |
| parents | fcfe324663a6 |
| children | 3c9232a684ae |
line wrap: on
line diff
--- a/Tools/scripts/h2py.py Thu Oct 21 13:01:23 2010 +0000 +++ b/Tools/scripts/h2py.py Thu Oct 21 13:29:10 2010 +0000 @@ -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)
