diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-05 21:38:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-05 21:38:47 (GMT) |
commit | 0ab0d532e146a573c487c7e5e4c66282136b7b57 (patch) | |
tree | c207c5d068a3f8ce9acde9a101534b8e67958256 /generic/tclBasic.c | |
parent | 4efb1a0f47c957eb324a55b4e51e7a4207002aa1 (diff) | |
download | tcl-0ab0d532e146a573c487c7e5e4c66282136b7b57.zip tcl-0ab0d532e146a573c487c7e5e4c66282136b7b57.tar.gz tcl-0ab0d532e146a573c487c7e5e4c66282136b7b57.tar.bz2 |
Implement TIP#335
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 |