[pypy-commit] pypy cpyext-gc-support-2: fix
arigo
pypy.commits at gmail.com
Sat Feb 13 11:22:20 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: cpyext-gc-support-2
Changeset: r82222:0656f5bc1381
Date: 2016-02-13 16:59 +0100
http://bitbucket.org/pypy/pypy/changeset/0656f5bc1381/
Log: fix
diff --git a/pypy/module/cpyext/slotdefs.py b/pypy/module/cpyext/slotdefs.py
--- a/pypy/module/cpyext/slotdefs.py
+++ b/pypy/module/cpyext/slotdefs.py
@@ -31,17 +31,16 @@
Py_GE = 5
-def check_num_args(space, ob, n):
- from pypy.module.cpyext.tupleobject import PyTuple_CheckExact, \
- PyTuple_GET_SIZE
- if not PyTuple_CheckExact(space, ob):
+def check_num_args(space, w_ob, n):
+ from pypy.module.cpyext.tupleobject import PyTuple_CheckExact
+ if not PyTuple_CheckExact(space, w_ob):
raise OperationError(space.w_SystemError,
space.wrap("PyArg_UnpackTuple() argument list is not a tuple"))
- if n == PyTuple_GET_SIZE(space, ob):
+ if n == space.len_w(w_ob):
return
raise oefmt(space.w_TypeError,
"expected %d arguments, got %d",
- n, PyTuple_GET_SIZE(space, ob))
+ n, space.len_w(w_ob))
def wrap_init(space, w_self, w_args, func, w_kwargs):
func_init = rffi.cast(initproc, func)
More information about the pypy-commit
mailing list