[pypy-svn] pypy improve-unwrap_spec: Since the trampoline function names its parameters consistently, unwrap_spec is not needed anymore.
amauryfa
commits-noreply at bitbucket.org
Thu Feb 17 10:19:26 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: improve-unwrap_spec
Changeset: r42101:c9ec1322984c
Date: 2011-02-16 19:45 +0100
http://bitbucket.org/pypy/pypy/changeset/c9ec1322984c/
Log: Since the trampoline function names its parameters consistently,
unwrap_spec is not needed anymore.
diff --git a/pypy/objspace/std/slicetype.py b/pypy/objspace/std/slicetype.py
--- a/pypy/objspace/std/slicetype.py
+++ b/pypy/objspace/std/slicetype.py
@@ -48,7 +48,6 @@
# ____________________________________________________________
- at gateway.unwrap_spec(args_w='args_w')
def descr__new__(space, w_slicetype, args_w):
from pypy.objspace.std.sliceobject import W_SliceObject
w_start = space.w_None
diff --git a/pypy/objspace/std/stdtypedef.py b/pypy/objspace/std/stdtypedef.py
--- a/pypy/objspace/std/stdtypedef.py
+++ b/pypy/objspace/std/stdtypedef.py
@@ -240,14 +240,9 @@
def wrap_trampoline_in_gateway(func, methname, multimethod):
"""NOT_RPYTHON"""
- unwrap_spec = [baseobjspace.ObjSpace] + [baseobjspace.W_Root]*multimethod.arity
- if multimethod.extras.get('varargs_w', False):
- unwrap_spec.append('args_w')
- if multimethod.extras.get('general__args__', False):
- unwrap_spec.append(argument.Arguments)
if 'doc' in multimethod.extras:
func.__doc__ = multimethod.extras['doc']
- return gateway.interp2app(func, app_name=methname, unwrap_spec=unwrap_spec)
+ return gateway.interp2app(func, app_name=methname)
def slicemultimethod(space, multimethod, typedef, result, local=False):
"""NOT_RPYTHON"""
More information about the Pypy-commit
mailing list