[Jython-checkins] jython: Remove recursion_count management
jim.baker
jython-checkins at python.org
Sat Jun 28 03:28:09 CEST 2014
http://hg.python.org/jython/rev/0cdb9e4839e8
changeset: 7322:0cdb9e4839e8
user: Jim Baker <jim.baker at rackspace.com>
date: Tue Jun 24 22:46:23 2014 -0600
summary:
Remove recursion_count management
files:
src/templates/object.derived | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/templates/object.derived b/src/templates/object.derived
--- a/src/templates/object.derived
+++ b/src/templates/object.derived
@@ -301,18 +301,12 @@
}
public PyObject __call__(PyObject args[], String keywords[]) {
- ThreadState ts = Py.getThreadState();
- if (ts.recursion_depth++ > ts.systemState.getrecursionlimit())
- throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
- try {
- PyType self_type = getType();
- PyObject impl = self_type.lookup("__call__");
- if (impl != null)
- return impl.__get__(this,self_type).__call__(args,keywords);
- return super.__call__(args,keywords);
- } finally {
- --ts.recursion_depth;
+ PyType self_type = getType();
+ PyObject impl = self_type.lookup("__call__");
+ if (impl != null) {
+ return impl.__get__(this,self_type).__call__(args,keywords);
}
+ return super.__call__(args,keywords);
}
public PyObject __findattr_ex__(String name) {
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list