[pypy-commit] pypy default: Fix missing change for the modified Signature API in 49dbf1f24170
rlamy
pypy.commits at gmail.com
Thu Aug 18 18:38:51 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r86297:ef1ddb6992ab
Date: 2016-08-18 23:38 +0100
http://bitbucket.org/pypy/pypy/changeset/ef1ddb6992ab/
Log: Fix missing change for the modified Signature API in 49dbf1f24170
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