Commits

Armin Rigo committed 0ee9430

Fix in backend_ctypes.

  • Participants
  • Parent commits beb3625

Comments (0)

Files changed (1)

File cffi/backend_ctypes.py

                         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