Commits

Amaury Forgeot d'Arc committed dff8741

Before calling a Python callback, from python, check that the arguments are convertible.
Ideally, we should go through ffi like cpython does

Comments (0)

Files changed (1)

lib_pypy/_ctypes/function.py

                     "This function takes %d argument%s (%s given)"
                     % (len(self._argtypes_), plural, len(args)))
 
+            # check that arguments are convertible
+            self._convert_args(self._argtypes_, args)
+
             try:
                 res = self.callable(*args)
             except: