[pypy-svn] r79532 - pypy/branch/fast-forward/lib_pypy/_ctypes

afa at codespeak.net afa at codespeak.net
Fri Nov 26 00:46:02 CET 2010


Author: afa
Date: Fri Nov 26 00:46:00 2010
New Revision: 79532

Modified:
   pypy/branch/fast-forward/lib_pypy/_ctypes/function.py
Log:
Callbacks may be called with more arguments than declared.


Modified: pypy/branch/fast-forward/lib_pypy/_ctypes/function.py
==============================================================================
--- pypy/branch/fast-forward/lib_pypy/_ctypes/function.py	(original)
+++ pypy/branch/fast-forward/lib_pypy/_ctypes/function.py	Fri Nov 26 00:46:00 2010
@@ -154,6 +154,7 @@
     
     def __call__(self, *args):
         if self.callable is not None:
+            args = args[:len(self._argtypes_)]
             try:
                 res = self.callable(*args)
             except:



More information about the Pypy-commit mailing list