[pypy-commit] pypy ffistruct: fix two NameErrors

antocuni noreply at buildbot.pypy.org
Thu Jan 12 14:28:24 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: ffistruct
Changeset: r51267:fba591df5224
Date: 2012-01-12 11:44 +0100
http://bitbucket.org/pypy/pypy/changeset/fba591df5224/

Log:	fix two NameErrors

diff --git a/pypy/module/_ffi/type_converter.py b/pypy/module/_ffi/type_converter.py
--- a/pypy/module/_ffi/type_converter.py
+++ b/pypy/module/_ffi/type_converter.py
@@ -2,6 +2,7 @@
 from pypy.rlib import jit
 from pypy.rlib.rarithmetic import intmask, r_uint
 from pypy.rpython.lltypesystem import rffi
+from pypy.interpreter.error import operationerrfmt
 from pypy.module._rawffi.structure import W_StructureInstance, W_Structure
 from pypy.module._ffi.interp_ffitype import app_types
 
@@ -100,7 +101,7 @@
             return w_arg
 
     def error(self, w_ffitype, w_obj):
-        raise operationerrfmt(space.w_TypeError,
+        raise operationerrfmt(self.space.w_TypeError,
                               'Unsupported ffi type to convert: %s',
                               w_ffitype.name)
 
@@ -253,7 +254,7 @@
         return self.space.wrap(float(singlefloatval))
 
     def error(self, w_ffitype):
-        raise operationerrfmt(space.w_TypeError,
+        raise operationerrfmt(self.space.w_TypeError,
                               'Unsupported ffi type to convert: %s',
                               w_ffitype.name)
 


More information about the pypy-commit mailing list