diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-19 11:13:10 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-19 11:13:10 (GMT) |
commit | 31903fa397abb5667586412419aff2b8fa18d98c (patch) | |
tree | 6d7c0b165d8533a48f6fa7278cbece64df4efc5a | |
parent | c2fe65f1b2b9c6fdcfd6020d461ec6817899f224 (diff) | |
download | tcl-31903fa397abb5667586412419aff2b8fa18d98c.zip tcl-31903fa397abb5667586412419aff2b8fa18d98c.tar.gz tcl-31903fa397abb5667586412419aff2b8fa18d98c.tar.bz2 |
improvements to comments
-rw-r--r-- | generic/tclCmdMZ.c | 20 | ||||
-rw-r--r-- | generic/tclDictObj.c | 18 |
2 files changed, 31 insertions, 7 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index e4ae079..662b201 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.157 2007/11/11 19:32:14 msofer Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.158 2007/11/19 11:13:10 dkf Exp $ */ #include "tclInt.h" @@ -2957,7 +2957,7 @@ Tcl_SwitchObjCmd( } /* - * TIP #280. Make invoking context available to switch branch. + * TIP #280: Make invoking context available to switch branch. */ result = TclEvalObjEx(interp, objv[j], 0, ctxPtr, j); @@ -3145,6 +3145,22 @@ Tcl_WhileObjCmd( return result; } +/* + *---------------------------------------------------------------------- + * + * TclListLines -- + * + * ??? + * + * Results: + * Filled in array of line numbers? + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + void TclListLines( CONST char *listStr, /* Pointer to string with list structure. diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 6f2acc3..f2d6807 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.51 2007/11/11 19:32:14 msofer Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.52 2007/11/19 11:17:24 dkf Exp $ */ #include "tclInt.h" @@ -624,6 +624,8 @@ TclTraceDictPath( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "key \"", TclGetString(keyv[i]), "\" not known in dictionary", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "DICT", + TclGetString(keyv[i]), NULL); } return NULL; } @@ -2239,7 +2241,10 @@ DictForCmd( break; } - /* TIP #280. Make invoking context available to loop body */ + /* + * TIP #280. Make invoking context available to loop body. + */ + result = TclEvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 4); if (result == TCL_CONTINUE) { result = TCL_OK; @@ -2570,7 +2575,10 @@ DictFilterCmd( goto abnormalResult; } - /* TIP #280. Make invoking context available to loop body */ + /* + * TIP #280. Make invoking context available to loop body. + */ + result = TclEvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 5); switch (result) { case TCL_OK: @@ -2848,10 +2856,10 @@ DictWithCmd( } /* - * Execute the body. + * Execute the body, while making the invoking context available to the + * loop body (TIP#280). */ - /* TIP #280. Make invoking context available to loop body */ result = TclEvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (body of \"dict with\")"); |