[pypy-commit] pypy default: unskip and fix a previously failing test
antocuni
noreply at buildbot.pypy.org
Mon Aug 29 15:49:45 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r46889:3b275b99dccf
Date: 2011-08-29 12:32 +0200
http://bitbucket.org/pypy/pypy/changeset/3b275b99dccf/
Log: unskip and fix a previously failing test
diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -469,7 +469,8 @@
newargs = []
for argtype, arg in zip(argtypes, args):
param = argtype.from_param(arg)
- if argtype._type_ == 'P': # special-case for c_void_p
+ _type_ = getattr(argtype, '_type_', None)
+ if _type_ == 'P': # special-case for c_void_p
param = param._get_buffer_value()
elif self._is_primitive(argtype):
param = param.value
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py b/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
@@ -150,7 +150,6 @@
class TestMoreCallbacks(BaseCTypesTestChecker):
def test_callback_with_struct_argument(self):
- py.test.skip("callbacks with struct arguments not implemented yet")
class RECT(Structure):
_fields_ = [("left", c_int), ("top", c_int),
("right", c_int), ("bottom", c_int)]
More information about the pypy-commit
mailing list