summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2009-03-18 16:52:05 (GMT)
committerdgp <dgp@noemail.net>2009-03-18 16:52:05 (GMT)
commit4ace4d059f6d8de6356bc6f5887ff9c3f8c68937 (patch)
treeeabee9727a668f27214ae4d28f70691ebd3ca046
parentf4c65264f8b47a9705d6885b4d29dbc2e23b4c59 (diff)
downloadtcl-4ace4d059f6d8de6356bc6f5887ff9c3f8c68937.zip
tcl-4ace4d059f6d8de6356bc6f5887ff9c3f8c68937.tar.gz
tcl-4ace4d059f6d8de6356bc6f5887ff9c3f8c68937.tar.bz2
* generic/tclVar.c (TclLookupSimpleVar): Shift all calls to
Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its callers, where control with TCL_LEAVE_ERR_MSG flag is more easily handled. [Bug 2689307] FossilOrigin-Name: 0d2e7ec8088ebb50802c532e63cf68e8685397c8
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclVar.c9
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a693a81..d52c8e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-18 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclVar.c (TclLookupSimpleVar): Shift all calls to
+ Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its callers,
+ where control with TCL_LEAVE_ERR_MSG flag is more easily handled.
+ [Bug 2689307]
+
2009-03-16 Donal K. Fellows <dkf@users.sf.net>
* generic/tclCmdMZ.c (TryPostBody): [Bug 2688063]: Extract information
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;
}
}