[pypy-svn] pypy jitypes2: make test_checkretval passing

antocuni commits-noreply at bitbucket.org
Tue Jan 4 14:04:50 CET 2011

Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r40376:fffe71048723
Date: 2011-01-03 16:43 +0100

Log:	make test_checkretval passing

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
@@ -485,7 +485,7 @@
         elif restype is not None:
             checker = getattr(self.restype, '_check_retval_', None)
             if checker:
-                val = restype(resbuffer[0])
+                val = restype(result)
                 # the original ctypes seems to make the distinction between
                 # classes defining a new type, and their subclasses
                 if '_type_' in restype.__dict__:

More information about the Pypy-commit mailing list