[pypy-svn] pypy jitypes2: don't pass argtypes to _build_result, it was unused

antocuni commits-noreply at bitbucket.org
Thu Jan 20 19:52:08 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r41080:af6744acd586
Date: 2011-01-18 16:07 +0100
http://bitbucket.org/pypy/pypy/changeset/af6744acd586/

Log:	don't pass argtypes to _build_result, it was unused

diff --git a/lib-python/2.7.0/platform.py b/lib-python/2.7.0/platform.py
--- a/lib-python/2.7.0/platform.py
+++ b/lib-python/2.7.0/platform.py
@@ -1345,7 +1345,7 @@
 
 _pypy_sys_version_parser = re.compile(
     r'([\w.+]+)\s*'
-    '\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*'
+    '\(#?([^,]*),\s*([\w ]+),\s*([\w :]+)\)\s*'
     '\[PyPy [^\]]+\]?')
 
 _sys_version_cache = {}

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
@@ -243,7 +243,7 @@
                 set_errno(_rawffi.get_errno())
             if self._flags_ & _rawffi.FUNCFLAG_USE_LASTERROR:
                 set_last_error(_rawffi.get_last_error())
-        result = self._build_result(restype, result, argtypes, newargs)
+        result = self._build_result(restype, result, newargs)
 
         # The 'errcheck' protocol
         if self._errcheck_:
@@ -434,7 +434,7 @@
         retval = restype._CData_retval(buf)
         return retval
 
-    def _build_result(self, restype, result, argtypes, argsandobjs):
+    def _build_result(self, restype, result, argsandobjs):
         """Build the function result:
            If there is no OUT parameter, return the actual function result
            If there is one OUT parameter, return it
@@ -474,8 +474,7 @@
 
         results = []
         if self._paramflags:
-            for argtype, obj, paramflag in zip(argtypes[1:], argsandobjs[1:],
-                                               self._paramflags):
+            for obj, paramflag in zip(argsandobjs[1:], self._paramflags):
                 if len(paramflag) == 2:
                     idlflag, name = paramflag
                 elif len(paramflag) == 3:


More information about the Pypy-commit mailing list