summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-11-14 23:17:02 (GMT)
committerhobbs <hobbs>2001-11-14 23:17:02 (GMT)
commit03bf512eba9ec5dde914e6b2cb171b35cf297b08 (patch)
treee2099b7a9dc4bb4dc572f484ee86baf5db2c28ae /generic/tclBasic.c
parent6b5ff76e865f488dd08efe0bd2a280b7ceda4543 (diff)
downloadtcl-03bf512eba9ec5dde914e6b2cb171b35cf297b08.zip
tcl-03bf512eba9ec5dde914e6b2cb171b35cf297b08.tar.gz
tcl-03bf512eba9ec5dde914e6b2cb171b35cf297b08.tar.bz2
Reference implementation of TIP's #22, #33 and #45. Adds the
ability of the [lindex] command to have multiple index arguments, and adds the [lset] command. Both commands are byte-code compiled. [Patch #471874] (work by Kenny, commited by Hobbs)
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 403d1a1..ce1381e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -8,11 +8,12 @@
* Copyright (c) 1987-1994 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
* Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
*
* 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.35 2001/09/01 00:51:31 hobbs Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.36 2001/11/14 23:17:03 hobbs Exp $
*/
#include "tclInt.h"
@@ -130,6 +131,8 @@ static CmdInfo builtInCmds[] = {
(CompileProc *) NULL, 1},
{"lsearch", (Tcl_CmdProc *) NULL, Tcl_LsearchObjCmd,
(CompileProc *) NULL, 1},
+ {"lset", (Tcl_CmdProc *) NULL, Tcl_LsetObjCmd,
+ TclCompileLsetCmd, 1},
{"lsort", (Tcl_CmdProc *) NULL, Tcl_LsortObjCmd,
(CompileProc *) NULL, 1},
{"namespace", (Tcl_CmdProc *) NULL, Tcl_NamespaceObjCmd,
@@ -2789,7 +2792,7 @@ Tcl_EvalObjEx(interp, objPtr, flags)
(objPtr->typePtr == &tclListType) && /* is a list... */
(objPtr->bytes == NULL) /* ...without a string rep */) {
register List *listRepPtr =
- (List *) objPtr->internalRep.otherValuePtr;
+ (List *) objPtr->internalRep.twoPtrValue.ptr1;
result = Tcl_EvalObjv(interp, listRepPtr->elemCount,
listRepPtr->elements, flags);
} else {