diff options
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index dbcaecd..cf618c7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.374 2008/10/28 23:29:54 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.375 2008/12/05 21:38:47 dkf Exp $ */ #include "tclInt.h" @@ -3955,6 +3955,30 @@ Tcl_CancelEval( /* *---------------------------------------------------------------------- * + * Tcl_InterpActive -- + * + * Returns non-zero if the specified interpreter is in use, i.e. if there + * is an evaluation currently active in the interpreter. + * + * Results: + * See above. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_InterpActive( + Tcl_Interp *interp) +{ + return ((Interp *) interp)->numLevels > 0; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_EvalObjv -- * * This function evaluates a Tcl command that has already been parsed |