[pypy-commit] pypy default: fix rsre for 32bit by not providing longs in code

fijal noreply at buildbot.pypy.org
Sat Jul 14 02:15:16 CEST 2012

Author: Maciej Fijalkowski <fijall at gmail.com>
Changeset: r56074:2d7d809676a7
Date: 2012-07-14 02:09 +0200

Log:	fix rsre for 32bit by not providing longs in code

diff --git a/pypy/rlib/rsre/rpy.py b/pypy/rlib/rsre/rpy.py
--- a/pypy/rlib/rsre/rpy.py
+++ b/pypy/rlib/rsre/rpy.py
@@ -1,6 +1,7 @@
 from pypy.rlib.rsre import rsre_char
 from pypy.rlib.rsre.rsre_core import match
+from pypy.rlib.rarithmetic import intmask
 def get_hacked_sre_compile(my_compile):
     """Return a copy of the sre_compile module for which the _sre
@@ -33,7 +34,7 @@
 class GotIt(Exception):
 def my_compile(pattern, flags, code, *args):
-    raise GotIt(code, flags, args)
+    raise GotIt([intmask(i) for i in code], flags, args)
 sre_compile_hacked = get_hacked_sre_compile(my_compile)
 def get_code(regexp, flags=0, allargs=False):

More information about the pypy-commit mailing list