summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-01-21 03:58:15 (GMT)
committerericm <ericm@noemail.net>2000-01-21 03:58:15 (GMT)
commit87fd47c3a92f7322283e7d4d25ec5228e8292728 (patch)
tree83e2e5a58bf7e3e0344630090989de95c50ec9d6 /generic/tclNamesp.c
parent40c6211549c1d289376a50cea64d9646a16aa358 (diff)
downloadtcl-87fd47c3a92f7322283e7d4d25ec5228e8292728.zip
tcl-87fd47c3a92f7322283e7d4d25ec5228e8292728.tar.gz
tcl-87fd47c3a92f7322283e7d4d25ec5228e8292728.tar.bz2
* namespace.test: Added test for undefined variables with
namespace which (bug #956). * tclNamesp.c: Added check for undefined variables in NamespaceWhichCmd (bug #956). FossilOrigin-Name: bb4c1ac9e3af39fe8a8642fa167356115896eb8a
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index ea7d0cd..478867d 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.14 2000/01/12 11:12:53 hobbs Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.15 2000/01/21 03:58:16 ericm Exp $
*/
#include "tclInt.h"
@@ -3628,7 +3628,8 @@ NamespaceWhichCmd(dummy, interp, objc, objv)
arg = Tcl_GetString(objv[argIndex]);
variable = Tcl_FindNamespaceVar(interp, arg, (Tcl_Namespace *) NULL,
/*flags*/ 0);
- if (variable != (Tcl_Var) NULL) {
+ if (variable != (Tcl_Var) NULL
+ && !TclIsVarUndefined((Var *)variable)) {
Tcl_GetVariableFullName(interp, variable, Tcl_GetObjResult(interp));
}
break;