summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--generic/tclVar.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 494f606..6d441ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-03-13 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+ * generic/tclVar.c (Tcl_UnsetObjCmd): Made command behave as
+ documented [issue remaining from bug #405769]
+
* generic/tclCmdMZ.c (Tcl_StringObjCmd): A missing
{return TCL_OK;} was causing memory corruption. [Bug #408002]
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 608185e..bba5e4f 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -14,7 +14,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.28 2001/03/06 14:45:03 dkf Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.29 2001/03/13 11:18:48 dkf Exp $
*/
#include "tclInt.h"
@@ -2609,10 +2609,16 @@ Tcl_UnsetObjCmd(dummy, interp, objc, objv)
register int i, flags = TCL_LEAVE_ERR_MSG;
register char *name;
- if (objc < 2) {
+ if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv,
"?-nocomplain? ?--? ?varName varName ...?");
return TCL_ERROR;
+ } else if (objc == 1) {
+ /*
+ * Do nothing if no arguments supplied, so as to match
+ * command documentation.
+ */
+ return TCL_OK;
}
/*