Is Tcl_SetRecusrsionLimit exposed as a Tcl command? Hopefully, I've
overlooked it in the docs. There are times when it would be convenient
to override the default, if I know I won't overflow the underlying C
stack.
Stephen
--
Stephen Trier
Technical Development Lab
Cleveland FES Center
s...@po.cwru.edu
Unfortunately it's only a C API with no Tcl interface ...
obviously it would be easy to wrap, but this is just something
that never did get exposed. I don't think a TIP would get
much objection, if you tied it to some tcl::recursionLimit
command or something.
--
Jeff Hobbs The Tcl Guy
Senior Developer http://www.ActiveState.com/
Tcl Support and Productivity Solutions
Well, if your code permits, there is a way to do "tail recursion" ;-)
See: <http://mini.net/tcl/1348.html>
Then you bypass the need for stacking procs on top of each other!
Regards,
Arjen
As the limit is defined per interpreter, I'd rather propose that as a
subcommand to [interp]. The tcl-wide variant (tcl::recursionLimit) would
be suitable for the default value used at interp creation.
OTOH, there are some dangers in this, at least on unix where
TclpCheckStackSpace() is not implemented [FR #450795]: too large a
recursion limit will blow the stack. We have cooked up a trial
implementation (with Andreas Kupries) that could probably be finished up
in no time.
Stephen: would you like to TIP that? Maybe [FR #219353] could/should
also be made part of the TIP? Let me know, I'll gladly work on an
implementation.
My 2 argentine pesos (currently more than 2 cents, maybe not for long
...)
Miguel
[FR #450795]:
http://sourceforge.net/tracker/?func=detail&aid=450795&group_id=10894&atid=360894
[FR #219353]:
http://sourceforge.net/tracker/?func=detail&aid=219353&group_id=10894&atid=360894