summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2001-11-14 23:17:01 (GMT)
committerhobbs <hobbs@noemail.net>2001-11-14 23:17:01 (GMT)
commit790913f75a784d5e869e4dc7b8c7aa36494005eb (patch)
treee2099b7a9dc4bb4dc572f484ee86baf5db2c28ae /generic/tclBasic.c
parent64916862c32081813b93fc1e088a37a8323b972a (diff)
downloadtcl-790913f75a784d5e869e4dc7b8c7aa36494005eb.zip
tcl-790913f75a784d5e869e4dc7b8c7aa36494005eb.tar.gz
tcl-790913f75a784d5e869e4dc7b8c7aa36494005eb.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) FossilOrigin-Name: 8e0db83abc5d97d0c5f9c8cbb3229ddc8e3a78da
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 {