diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclBasic.c | 7 | ||||
-rw-r--r-- | tests/cmdMZ.test | 3 |
3 files changed, 11 insertions, 5 deletions
@@ -1,5 +1,11 @@ 2003-05-12 Don Porter <dgp@users.sourceforge.net> + * generic/tclBasic.c (TclInvokeObjectCommand): objv[argc] is no + longer set to NULL (Tcl_CreateObjCommand docs already say that it + should not be accessed). + + * tests/cmdMZ.test: Forgot to import [temporaryDirectory]. + * generic/tclObj.c (tclCmdNameType): Corrected variable use of the otherValuePtr or the twoPtrValue.ptr1 fields to store a (ResolvedCmdName *) as the internal rep. [Bug 726018]. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 5551c45..0fc1e59 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.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: tclBasic.c,v 1.81 2003/05/05 20:54:38 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.82 2003/05/12 20:15:28 dgp Exp $ */ #include "tclInt.h" @@ -1856,9 +1856,9 @@ TclInvokeObjectCommand(clientData, interp, argc, argv) * end-of-objv word. */ - if ((argc + 1) > NUM_ARGS) { + if (argc > NUM_ARGS) { objv = (Tcl_Obj **) - ckalloc((unsigned)(argc + 1) * sizeof(Tcl_Obj *)); + ckalloc((unsigned)(argc * sizeof(Tcl_Obj *))); } for (i = 0; i < argc; i++) { @@ -1868,7 +1868,6 @@ TclInvokeObjectCommand(clientData, interp, argc, argv) Tcl_IncrRefCount(objPtr); objv[i] = objPtr; } - objv[argc] = 0; /* * Invoke the command's object-based Tcl_ObjCmdProc. diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index c6416df..4da945f 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.14 2003/05/05 20:54:50 dgp Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.15 2003/05/12 20:15:28 dgp Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -22,6 +22,7 @@ namespace eval ::tcl::test::cmdMZ { namespace import ::tcltest::cleanupTests namespace import ::tcltest::makeFile namespace import ::tcltest::removeFile + namespace import ::tcltest::temporaryDirectory namespace import ::tcltest::test set ::tcltest::testConstraints(nonLinuxOnly) \ |