diff options
author | dgp <dgp@users.sourceforge.net> | 2007-07-19 13:43:42 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-07-19 13:43:42 (GMT) |
commit | 5bd8a0386d769f512da9dab55cd949fd0d8329bc (patch) | |
tree | 44549f05e23c7c685e6ef2831cdb31a1549f68a6 /generic/tclParse.c | |
parent | b72d91bd10dfec0ff66a2bdc8d79d9b7de67dc98 (diff) | |
download | tcl-5bd8a0386d769f512da9dab55cd949fd0d8329bc.zip tcl-5bd8a0386d769f512da9dab55cd949fd0d8329bc.tar.gz tcl-5bd8a0386d769f512da9dab55cd949fd0d8329bc.tar.bz2 |
* generic/tclParse.c: In contexts where interp and parsePtr->interp
might be different, be sure to use the latter for error reporting.
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; |