summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 23fca3f..2ce9779 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -4390,11 +4390,16 @@ Tcl_LsetObjCmd(
* unshared copy of it.
*/
- if (objc == 4) {
+ if (TclHasInternalRep(listPtr,&tclAbstractListType) &&
+ TclAbstractListHasProc(listPtr, TCL_ABSL_SETELEMENT) &&
+ objc == 4) {
+ finalValuePtr = Tcl_AbstractListSetElement(interp, listPtr, objv[2], objv[3]);
+ if (finalValuePtr) Tcl_IncrRefCount(finalValuePtr);
+ } else if (objc == 4) {
finalValuePtr = TclLsetList(interp, listPtr, objv[2], objv[3]);
} else {
finalValuePtr = TclLsetFlat(interp, listPtr, objc-3, objv+2,
- objv[objc-1]);
+ objv[objc-1]);
}
/*