Author: Antonio Cuni <anto.c...@gmail.com> Branch: jitypes2 Changeset: r44621:4d19742e3132 Date: 2011-06-01 14:18 +0200 http://bitbucket.org/pypy/pypy/changeset/4d19742e3132/
Log: now pointer types are cached, so we can simply check by identity diff --git a/lib_pypy/_ctypes/pointer.py b/lib_pypy/_ctypes/pointer.py --- a/lib_pypy/_ctypes/pointer.py +++ b/lib_pypy/_ctypes/pointer.py @@ -123,8 +123,7 @@ my_ffitype = type(value).get_ffi_argtype() # for now, we always allow types.pointer, else a lot of tests # break. We need to rethink how pointers are represented, though - if my_ffitype.deref_pointer() != ffitype.deref_pointer() and \ - ffitype is not _ffi.types.void_p: + if my_ffitype is not ffitype and ffitype is not _ffi.types.void_p: raise ArgumentError, "expected %s instance, got %s" % (type(value), ffitype) return value._get_buffer_value() _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit