From 9dcbe336bddd91bb7fab7be8e33ce7fed7f229ce Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Mar 2006 16:07:42 +0000 Subject: * generic/tclExecute.c: Complete missing bit of TIP 215 implementation * tests/incr.test: --- ChangeLog | 5 +++++ generic/tclExecute.c | 4 ++-- tests/incr.test | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b601ea2..19b8961 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-08 Don Porter + + * generic/tclExecute.c: Complete missing bit of TIP 215 implementation + * tests/incr.test: + 2006-03-07 Joe English * unix/tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD, as per the other *BSD variants [Bug 1334613]. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 6777cd2..bdd106c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.226 2006/02/09 17:34:41 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.227 2006/03/08 16:07:42 dgp Exp $ */ #include "tclInt.h" @@ -2431,7 +2431,7 @@ TclExecuteByteCode( } TRACE(("%u \"%.30s\" (by %ld) => ", opnd, part2, i)); varPtr = TclLookupArrayElement(interp, part1, part2, - TCL_LEAVE_ERR_MSG, "read", 0, 1, arrayPtr); + TCL_LEAVE_ERR_MSG, "read", 1, 1, arrayPtr); if (varPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); result = TCL_ERROR; diff --git a/tests/incr.test b/tests/incr.test index 3bd1541..9ac1443 100644 --- a/tests/incr.test +++ b/tests/incr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: incr.test,v 1.12 2006/02/09 17:34:42 dgp Exp $ +# RCS: @(#) $Id: incr.test,v 1.13 2006/03/08 16:07:43 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -514,6 +514,13 @@ test incr-3.2 {increment by wide amount: command route} { $z x 123123123123 } 123123123123 +test incr-4.1 {increment non-existing array element [Bug 1445454]} -body { + proc x {} {incr a(1)} + x +} -cleanup { + rename x {} +} -result 1 + # cleanup ::tcltest::cleanupTests return -- cgit v0.12