diff options
author | dgp <dgp@noemail.net> | 2007-07-19 13:43:42 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2007-07-19 13:43:42 (GMT) |
commit | f4f96e325ce4da65e19936a76ff9815015114446 (patch) | |
tree | 44549f05e23c7c685e6ef2831cdb31a1549f68a6 /generic/tclParse.c | |
parent | f1de8da7bfc6ffbc6c2f9c87452d8a11aee4bc62 (diff) | |
download | tcl-f4f96e325ce4da65e19936a76ff9815015114446.zip tcl-f4f96e325ce4da65e19936a76ff9815015114446.tar.gz tcl-f4f96e325ce4da65e19936a76ff9815015114446.tar.bz2 |
* generic/tclParse.c: In contexts where interp and parsePtr->interp
might be different, be sure to use the latter for error reporting.
FossilOrigin-Name: 01fbe5d14ad428fbf8f95244d74398b30f5731b8
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index fc7a77c..e02f836 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.25.2.1 2006/09/24 21:15:10 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.25.2.2 2007/07/19 13:43:42 dgp Exp $ */ #include "tclInt.h" @@ -1153,9 +1153,9 @@ Tcl_ParseVarName(interp, string, numBytes, parsePtr, append) numBytes--; src++; } if (numBytes == 0) { - if (interp != NULL) { - Tcl_SetResult(interp, "missing close-brace for variable name", - TCL_STATIC); + if (parsePtr->interp != NULL) { + Tcl_SetResult(parsePtr->interp, + "missing close-brace for variable name", TCL_STATIC); } parsePtr->errorType = TCL_PARSE_MISSING_VAR_BRACE; parsePtr->term = tokenPtr->start-1; @@ -1423,7 +1423,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr) parsePtr->errorType = TCL_PARSE_MISSING_BRACE; parsePtr->term = string; parsePtr->incomplete = 1; - if (interp == NULL) { + if (parsePtr->interp == NULL) { /* * Skip straight to the exit code since we have no * interpreter to put error message in. @@ -1431,7 +1431,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr) goto error; } - Tcl_SetResult(interp, "missing close-brace", TCL_STATIC); + Tcl_SetResult(parsePtr->interp, "missing close-brace", TCL_STATIC); /* * Guess if the problem is due to comments by searching @@ -1451,7 +1451,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr) break; case '#' : if (openBrace && (isspace(UCHAR(src[-1])))) { - Tcl_AppendResult(interp, + Tcl_AppendResult(parsePtr->interp, ": possible unbalanced brace in comment", (char *) NULL); goto error; @@ -1610,7 +1610,7 @@ Tcl_ParseQuotedString(interp, string, numBytes, parsePtr, append, termPtr) goto error; } if (*parsePtr->term != '"') { - if (interp != NULL) { + if (parsePtr->interp != NULL) { Tcl_SetResult(parsePtr->interp, "missing \"", TCL_STATIC); } parsePtr->errorType = TCL_PARSE_MISSING_QUOTE; |