[pypy-svn] r77775 - pypy/branch/jitffi/pypy/module/_ffi
antocuni at codespeak.net
antocuni at codespeak.net
Mon Oct 11 11:30:21 CEST 2010
Author: antocuni
Date: Mon Oct 11 11:30:20 2010
New Revision: 77775
Modified:
pypy/branch/jitffi/pypy/module/_ffi/interp_ffi.py
Log:
reformat to stay in 80 columns
Modified: pypy/branch/jitffi/pypy/module/_ffi/interp_ffi.py
==============================================================================
--- pypy/branch/jitffi/pypy/module/_ffi/interp_ffi.py (original)
+++ pypy/branch/jitffi/pypy/module/_ffi/interp_ffi.py Mon Oct 11 11:30:20 2010
@@ -1,6 +1,8 @@
import sys
-from pypy.interpreter.baseobjspace import W_Root, ObjSpace, Wrappable, Arguments
-from pypy.interpreter.error import OperationError, wrap_oserror, operationerrfmt
+from pypy.interpreter.baseobjspace import W_Root, ObjSpace, Wrappable, \
+ Arguments
+from pypy.interpreter.error import OperationError, wrap_oserror, \
+ operationerrfmt
from pypy.interpreter.gateway import interp2app, NoneNotWrapped, unwrap_spec
from pypy.interpreter.typedef import TypeDef, GetSetProperty
#
@@ -55,16 +57,18 @@
@jit.unroll_safe
def build_argchain(self, space, argtypes, args_w):
- if len(args_w) != len(argtypes):
+ expected = len(argtypes)
+ given = len(args_w)
+ if given != expected:
arg = 'arguments'
if len(argtypes) == 1:
arg = 'argument'
raise operationerrfmt(space.w_TypeError,
'%s() takes exactly %d %s (%d given)',
- self.func.name, len(argtypes), arg, len(args_w))
+ self.func.name, expected, arg, given)
#
argchain = libffi.ArgChain()
- for i in range(len(args_w)):
+ for i in range(expected):
argtype = argtypes[i]
w_arg = args_w[i]
kind = libffi.types.getkind(argtype)
More information about the Pypy-commit
mailing list