diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-28 23:16:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-28 23:16:31 (GMT) |
commit | 71b0ad990caaf6a297049da2c63821a4e29c57ac (patch) | |
tree | f27faff96ed68e42d4c00da3a522f9eef06a2528 /generic/tclListObj.c | |
parent | da196c33450ded41b2370bf956f7d3cd7b081069 (diff) | |
download | tcl-71b0ad990caaf6a297049da2c63821a4e29c57ac.zip tcl-71b0ad990caaf6a297049da2c63821a4e29c57ac.tar.gz tcl-71b0ad990caaf6a297049da2c63821a4e29c57ac.tar.bz2 |
Reduce shimmering: If a conclusion can be drawn about the number of list elements, don't get the elements before the list length is checked
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r-- | generic/tclListObj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 776ff0e..80477f7 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -1994,7 +1994,7 @@ int Tcl_ListObjLength( Tcl_Interp *interp, /* Used to report errors if not NULL. */ Tcl_Obj *listObj, /* List object whose #elements to return. */ - Tcl_Size *lenPtr) /* The resulting int is stored here. */ + Tcl_Size *lenPtr) /* The resulting length is stored here. */ { ListRep listRep; @@ -2632,7 +2632,7 @@ TclLindexFlat( /* Handle ArithSeries as special case */ if (TclHasInternalRep(listObj,&tclArithSeriesType)) { - Tcl_WideInt listLen = TclArithSeriesObjLength(listObj); + Tcl_Size listLen = TclArithSeriesObjLength(listObj); Tcl_Size index; Tcl_Obj *elemObj = NULL; for (i=0 ; i<indexCount && listObj ; i++) { |