[pypy-svn] r15294 - pypy/dist/pypy/interpreter/pyparser

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Jul 28 21:39:42 CEST 2005


Author: cfbolz
Date: Thu Jul 28 21:39:41 2005
New Revision: 15294

Modified:
   pypy/dist/pypy/interpreter/pyparser/parsestring.py
Log:
(samuele, cfbolz):

added missing hexbyte



Modified: pypy/dist/pypy/interpreter/pyparser/parsestring.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/parsestring.py	(original)
+++ pypy/dist/pypy/interpreter/pyparser/parsestring.py	Thu Jul 28 21:39:41 2005
@@ -92,6 +92,11 @@
     v = PyString_DecodeEscape(space, s[ps : q], unicode, enc)
     return space.wrap(v)
 
+def hexbyte(val):
+    result = "%x" % val
+    if len(result) == 1:
+        result = "0" + result
+    return result
 
 def PyString_DecodeEscape(space, s, unicode, recode_encoding):
     """



More information about the Pypy-commit mailing list