[pypy-commit] cffi default: Fix in backend_ctypes.

arigo noreply at buildbot.pypy.org
Tue Sep 18 11:14:31 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r940:0ee9430b3c1d
Date: 2012-09-18 11:13 +0200
http://bitbucket.org/cffi/cffi/changeset/0ee9430b3c1d/

Log:	Fix in backend_ctypes.

diff --git a/cffi/backend_ctypes.py b/cffi/backend_ctypes.py
--- a/cffi/backend_ctypes.py
+++ b/cffi/backend_ctypes.py
@@ -838,11 +838,10 @@
                         args2.append(BArg._from_ctypes(arg))
                     try:
                         res2 = init(*args2)
+                        res2 = BResult._to_ctypes(res2)
                     except:
                         traceback.print_exc()
                         res2 = error
-                    else:
-                        res2 = BResult._to_ctypes(res2)
                     if issubclass(BResult, CTypesGenericPtr):
                         if res2:
                             res2 = ctypes.cast(res2, ctypes.c_void_p).value


More information about the pypy-commit mailing list