From 848f3e85419c57c034cd7ebe11918e835f04782b Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 12 May 2003 20:15:26 +0000 Subject: * 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]. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 7 +++---- tests/cmdMZ.test | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c8a523..aa942ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-05-12 Don Porter + * 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) \ -- cgit v0.12