diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-10 09:26:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-10 09:26:16 (GMT) |
commit | 8f805cf711937914ecd371343acfe9a4b8f27238 (patch) | |
tree | ae39f8b2d3ef7155cbb47b6e2f33170f38aac9a4 /generic/tclIndexObj.c | |
parent | f608eb10d475301aedbbf0d6a0addbd50dea0e34 (diff) | |
download | tcl-8f805cf711937914ecd371343acfe9a4b8f27238.zip tcl-8f805cf711937914ecd371343acfe9a4b8f27238.tar.gz tcl-8f805cf711937914ecd371343acfe9a4b8f27238.tar.bz2 |
Use TclListObjLength/TclListObjGetElements in stead of Tcl_ListObjLength/Tcl_ListObjGetElements everywhere. This is slightly more efficient if the refered list already has the correct type
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 8911f00..b17b224 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -184,7 +184,7 @@ GetIndexFromObjList( * of the code there. This is a bit ineffiecient but simpler. */ - result = Tcl_ListObjGetElements(interp, tableObjPtr, &objc, &objv); + result = TclListObjGetElements(interp, tableObjPtr, &objc, &objv); if (result != TCL_OK) { return result; } @@ -588,7 +588,7 @@ PrefixMatchObjCmd( return TCL_ERROR; } i++; - result = Tcl_ListObjLength(interp, objv[i], &errorLength); + result = TclListObjLength(interp, objv[i], &errorLength); if (result != TCL_OK) { return TCL_ERROR; } @@ -612,7 +612,7 @@ PrefixMatchObjCmd( * error case regardless of level. */ - result = Tcl_ListObjLength(interp, tablePtr, &dummyLength); + result = TclListObjLength(interp, tablePtr, &dummyLength); if (result != TCL_OK) { return result; } @@ -677,7 +677,7 @@ PrefixAllObjCmd( return TCL_ERROR; } - result = Tcl_ListObjGetElements(interp, objv[1], &tableObjc, &tableObjv); + result = TclListObjGetElements(interp, objv[1], &tableObjc, &tableObjv); if (result != TCL_OK) { return result; } @@ -734,7 +734,7 @@ PrefixLongestObjCmd( return TCL_ERROR; } - result = Tcl_ListObjGetElements(interp, objv[1], &tableObjc, &tableObjv); + result = TclListObjGetElements(interp, objv[1], &tableObjc, &tableObjv); if (result != TCL_OK) { return result; } |