diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclVar.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 0af352c..e61e06e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.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: tclVar.c,v 1.176 2009/02/10 23:08:57 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.177 2009/03/18 16:52:20 dgp Exp $ */ #include "tclInt.h" @@ -972,13 +972,9 @@ TclLookupSimpleVar( flags, &varNsPtr, &dummy1Ptr, &dummy2Ptr, &tail); if (varNsPtr == NULL) { *errMsgPtr = badNamespace; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - NULL); return NULL; } else if (tail == NULL) { *errMsgPtr = missingName; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - NULL); return NULL; } if (tail != varName) { @@ -1001,7 +997,6 @@ TclLookupSimpleVar( } } else { /* Var wasn't found and not to create it. */ *errMsgPtr = noSuchVar; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); return NULL; } } @@ -1038,7 +1033,6 @@ TclLookupSimpleVar( } if (varPtr == NULL) { *errMsgPtr = noSuchVar; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } } } @@ -3621,6 +3615,7 @@ TclPtrObjMakeUpvar( myFlags|AVOID_RESOLVERS, /* create */ 1, &errMsg, &index); if (varPtr == NULL) { TclObjVarErrMsg(interp, myNamePtr, NULL, "create", errMsg, -1); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); return TCL_ERROR; } } |