[pypy-commit] pypy default: Fixed _ffi tests with -A

alex_gaynor noreply at buildbot.pypy.org
Fri Dec 7 06:16:18 CET 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r59357:9087fe279e22
Date: 2012-12-06 21:16 -0800
http://bitbucket.org/pypy/pypy/changeset/9087fe279e22/

Log:	Fixed _ffi tests with -A

diff --git a/pypy/module/_ffi/test/test_struct.py b/pypy/module/_ffi/test/test_struct.py
--- a/pypy/module/_ffi/test/test_struct.py
+++ b/pypy/module/_ffi/test/test_struct.py
@@ -53,7 +53,10 @@
             array = ptr_array[0]
             lst = [array[i] for i in range(length)]
             return space.wrap(lst)
-        cls.w_read_raw_mem = cls.space.wrap(interp2app(read_raw_mem))
+        if cls.runappdirect:
+            cls.w_read_raw_mem = lambda self, addr, typename, length: read_raw_mem(cls.space, addr, typename, length)
+        else:
+            cls.w_read_raw_mem = cls.space.wrap(interp2app(read_raw_mem))
         #
         from pypy.rlib import clibffi
         from pypy.rlib.rarithmetic import r_uint


More information about the pypy-commit mailing list