diff options
author | rjohnson <rjohnson> | 1998-10-13 20:30:21 (GMT) |
---|---|---|
committer | rjohnson <rjohnson> | 1998-10-13 20:30:21 (GMT) |
commit | 2145c0e799d0659cd675a37728d7fb9c64f04904 (patch) | |
tree | a5274f70d346f2ba069c979b043ef055b8777e35 | |
parent | 34fd6003c9fe9da83ffe806108ebbd4bbffb796e (diff) | |
download | tcl-2145c0e799d0659cd675a37728d7fb9c64f04904.zip tcl-2145c0e799d0659cd675a37728d7fb9c64f04904.tar.gz tcl-2145c0e799d0659cd675a37728d7fb9c64f04904.tar.bz2 |
Fixed bug in Tcl_SetListObj - it used to create invalid Tcl_Obj if you passed
in 0 elements. Despite what docs said.
Also updated a few copyright notices.
-rw-r--r-- | changes | 9 | ||||
-rw-r--r-- | generic/tcl.h | 3 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 3 | ||||
-rw-r--r-- | generic/tclInt.h | 3 | ||||
-rw-r--r-- | generic/tclListObj.c | 5 | ||||
-rw-r--r-- | tests/cmdIL.test | 3 |
6 files changed, 18 insertions, 8 deletions
@@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.25 1998/10/13 20:05:38 rjohnson Exp $ +RCS: @(#) $Id: changes,v 1.26 1998/10/13 20:30:21 rjohnson Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -3630,6 +3630,9 @@ for providing this fix. (RJ) 10/13/98 (bug fix) The "lsort -dictionary" command did not properly handle some numbers starting with 0. Thanks to Richard Hipp -<drh@acm.org> for the creating the patch and Viktor Dukhovni -<Viktor-Dukhovni@deshaw.com> for submitting the it to Scriptics. (RJ) +<drh@acm.org> for submitting the fix to Scriptics. (RJ) +10/13/98 (bug fix) The function Tcl_SetListObj was creating an invalid +Tcl_Obj if the list had zero elements (despite what the comments said +it would do). Thanks to Sebastian Wangnick for reporting the +problem. (RJ) diff --git a/generic/tcl.h b/generic/tcl.h index c2eef66..7a7093c 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -7,11 +7,12 @@ * Copyright (c) 1987-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1993-1996 Lucent Technologies. + * Copyright (c) 1998 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.27 1998/10/13 19:03:53 escoffon Exp $ + * RCS: @(#) $Id: tcl.h,v 1.28 1998/10/13 20:30:22 rjohnson Exp $ */ #ifndef _TCL diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 05d09ae..3738b64 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -9,11 +9,12 @@ * Copyright (c) 1987-1993 The Regents of the University of California. * Copyright (c) 1993-1997 Lucent Technologies. * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright (c) 1998 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.9 1998/10/13 20:05:39 rjohnson Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.10 1998/10/13 20:30:22 rjohnson Exp $ */ #include "tclInt.h" diff --git a/generic/tclInt.h b/generic/tclInt.h index 4c4d632..e7caf17 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -6,11 +6,12 @@ * Copyright (c) 1987-1993 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1993-1997 Lucent Technologies. + * Copyright (c) 1998 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.19 1998/10/05 22:32:09 escoffon Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.20 1998/10/13 20:30:22 rjohnson Exp $ */ #ifndef _TCLINT diff --git a/generic/tclListObj.c b/generic/tclListObj.c index f636071..1b943a6 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -5,11 +5,12 @@ * type. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. + * Copyright (c) 1998 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.2 1998/09/14 18:40:00 stanton Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.3 1998/10/13 20:30:23 rjohnson Exp $ */ #include "tclInt.h" @@ -260,6 +261,8 @@ Tcl_SetListObj(objPtr, objc, objv) objPtr->internalRep.otherValuePtr = (VOID *) listRepPtr; objPtr->typePtr = &tclListType; + } else { + objPtr->bytes = tclEmptyStringRep; } } diff --git a/tests/cmdIL.test b/tests/cmdIL.test index f01728b..cd7cf31 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -3,11 +3,12 @@ # generates output for errors. No output means no errors were found. # # Copyright (c) 1997 Sun Microsystems, Inc. +# Copyright (c) 1998 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.4 1998/10/13 20:05:39 rjohnson Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.5 1998/10/13 20:30:23 rjohnson Exp $ if {[string compare test [info procs test]] == 1} then {source defs} |