Author: Carl Friedrich Bolz <[email protected]>
Branch: virtual-arguments
Changeset: r54657:2ebd2356d035
Date: 2012-04-22 11:53 +0200
http://bitbucket.org/pypy/pypy/changeset/2ebd2356d035/
Log: give an error when the predicate of look_inside_iff has a different
number of arguments than the decorated function.
diff --git a/pypy/rlib/jit.py b/pypy/rlib/jit.py
--- a/pypy/rlib/jit.py
+++ b/pypy/rlib/jit.py
@@ -148,6 +148,8 @@
thing._annspecialcase_ = "specialize:call_location"
args = _get_args(func)
+ predicateargs = _get_args(predicate)
+ assert len(args) == len(predicateargs), "%s and predicate %s need the
same numbers of arguments" % (func, predicate)
d = {
"dont_look_inside": dont_look_inside,
"predicate": predicate,
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit