[pypy-commit] pypy py3.5: hg merge py3k

rlamy pypy.commits at gmail.com
Thu Aug 18 18:40:41 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r86299:1dd495a13d2c
Date: 2016-08-18 23:39 +0100
http://bitbucket.org/pypy/pypy/changeset/1dd495a13d2c/

Log:	hg merge py3k

diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -11,7 +11,7 @@
 from rpython.rtyper.annlowlevel import llhelper
 from rpython.rlib.objectmodel import we_are_translated, keepalive_until_here
 from rpython.rlib.objectmodel import dont_inline
-from rpython.rlib.rfile import (FILEP, c_fread, c_fclose, c_fwrite, 
+from rpython.rlib.rfile import (FILEP, c_fread, c_fclose, c_fwrite,
         c_fdopen, c_fileno,
         c_fopen)# for tests
 from rpython.translator import cdir
@@ -259,14 +259,14 @@
 
         # extract the signature from the (CPython-level) code object
         from pypy.interpreter import pycode
-        argnames, varargname, kwargname = pycode.cpython_code_signature(callable.func_code)
+        sig = pycode.cpython_code_signature(callable.func_code)
+        assert sig.argnames[0] == 'space'
+        self.argnames = sig.argnames[1:]
+        if gil == 'pygilstate_ensure':
+            assert self.argnames[-1] == 'previous_state'
+            del self.argnames[-1]
+        assert len(self.argnames) == len(self.argtypes)
 
-        assert argnames[0] == 'space'
-        if gil == 'pygilstate_ensure':
-            assert argnames[-1] == 'previous_state'
-            del argnames[-1]
-        self.argnames = argnames[1:]
-        assert len(self.argnames) == len(self.argtypes)
         self.gil = gil
         self.result_borrowed = result_borrowed
         self.result_is_ll = result_is_ll


More information about the pypy-commit mailing list