From: <pj...@us...> - 2011-03-18 01:27:02
|
Revision: 7244 http://jython.svn.sourceforge.net/jython/?rev=7244&view=rev Author: pjenvey Date: 2011-03-18 01:26:55 +0000 (Fri, 18 Mar 2011) Log Message: ----------- add ThreadState.enter/leaveRecursiveCall Modified Paths: -------------- trunk/jython/src/org/python/core/ThreadState.java Modified: trunk/jython/src/org/python/core/ThreadState.java =================================================================== --- trunk/jython/src/org/python/core/ThreadState.java 2011-03-17 23:02:35 UTC (rev 7243) +++ trunk/jython/src/org/python/core/ThreadState.java 2011-03-18 01:26:55 UTC (rev 7244) @@ -86,4 +86,14 @@ } return compareStateDict; } + + public void enterRecursiveCall(String where) { + if (recursion_depth++ > systemState.getrecursionlimit()) { + throw Py.RuntimeError("maximum recursion depth exceeded" + where); + } + } + + public void leaveRecursiveCall() { + --recursion_depth; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |