From 7fe003f8d24f263ca82d1ddf0a54f6ab16f01306 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 7 Mar 2018 14:16:08 +0000 Subject: Remove pointless duplication. --- generic/tclListObj.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 0d37821..13704b9 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -1145,15 +1145,9 @@ TclLindexList( return TclLindexFlat(interp, listPtr, 1, &argPtr); } - if (indexListCopy->typePtr == &tclListType) { - List *listRepPtr = ListRepPtr(indexListCopy); - - listPtr = TclLindexFlat(interp, listPtr, listRepPtr->elemCount, - &listRepPtr->elements); - } else { - int indexCount = -1; /* Size of the array of list indices. */ - Tcl_Obj **indices = NULL; - /* Array of list indices. */ + { + int indexCount = -1; /* Size of the array of list indices. */ + Tcl_Obj **indices = NULL; /* Array of list indices. */ Tcl_ListObjGetElements(NULL, indexListCopy, &indexCount, &indices); listPtr = TclLindexFlat(interp, listPtr, indexCount, indices); -- cgit v0.12