SetRecLmt.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
源码类别:

通讯编程

开发平台:

Visual C++

  1. '"
  2. '" Copyright (c) 1989-1993 The Regents of the University of California.
  3. '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
  4. '"
  5. '" See the file "license.terms" for information on usage and redistribution
  6. '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '" 
  8. '" RCS: @(#) $Id: SetRecLmt.3,v 1.3 1999/04/16 00:46:33 stanton Exp $
  9. '" 
  10. .so man.macros
  11. .TH Tcl_SetRecursionLimit 3 7.0 Tcl "Tcl Library Procedures"
  12. .BS
  13. .SH NAME
  14. Tcl_SetRecursionLimit - set maximum allowable nesting depth in interpreter
  15. .SH SYNOPSIS
  16. .nf
  17. fB#include <tcl.h>fR
  18. .sp
  19. int
  20. fBTcl_SetRecursionLimitfR(fIinterp, depthfR)
  21. .SH ARGUMENTS
  22. .AS Tcl_Interp *interp
  23. .AP Tcl_Interp *interp in
  24. Interpreter whose recursion limit is to be set.
  25. Must be greater than zero.
  26. .AP int depth in
  27. New limit for nested calls to fBTcl_EvalfR for fIinterpfR.
  28. .BE
  29. .SH DESCRIPTION
  30. .PP
  31. At any given time Tcl enforces a limit on the number of recursive
  32. calls that may be active for fBTcl_EvalfR and related procedures
  33. such as fBTcl_GlobalEvalfR.
  34. Any call to fBTcl_EvalfR that exceeds this depth is aborted with
  35. an error.
  36. By default the recursion limit is 1000.
  37. .PP
  38. fBTcl_SetRecursionLimitfR may be used to change the maximum
  39. allowable nesting depth for an interpreter.
  40. The fIdepthfR argument specifies a new limit for fIinterpfR,
  41. and fBTcl_SetRecursionLimitfR returns the old limit.
  42. To read out the old limit without modifying it, invoke
  43. fBTcl_SetRecursionLimitfR with fIdepthfR equal to 0.
  44. .PP
  45. The fBTcl_SetRecursionLimitfR only sets the size of the Tcl
  46. call stack:  it cannot by itself prevent stack overflows on the
  47. C stack being used by the application.  If your machine has a
  48. limit on the size of the C stack, you may get stack overflows
  49. before reaching the limit set by fBTcl_SetRecursionLimitfR.
  50. If this happens, see if there is a mechanism in your system for
  51. increasing the maximum size of the C stack.
  52. .SH KEYWORDS
  53. nesting depth, recursion