summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-10 09:26:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-10 09:26:16 (GMT)
commit8f805cf711937914ecd371343acfe9a4b8f27238 (patch)
treeae39f8b2d3ef7155cbb47b6e2f33170f38aac9a4 /generic/tclEnsemble.c
parentf608eb10d475301aedbbf0d6a0addbd50dea0e34 (diff)
downloadtcl-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/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index bdf4d84..5e0a9e2 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -1882,7 +1882,7 @@ NsEnsembleImplementationCmdNR(
Tcl_Obj **copyObjv;
int copyObjc, prefixObjc;
- Tcl_ListObjLength(NULL, prefixObj, &prefixObjc);
+ TclListObjLength(NULL, prefixObj, &prefixObjc);
if (objc == 2) {
copyPtr = TclListObjCopy(NULL, prefixObj);
@@ -1916,7 +1916,7 @@ NsEnsembleImplementationCmdNR(
*/
TclSkipTailcall(interp);
- Tcl_ListObjGetElements(NULL, copyPtr, &copyObjc, &copyObjv);
+ TclListObjGetElements(NULL, copyPtr, &copyObjc, &copyObjv);
((Interp *)interp)->lookupNsPtr = ensemblePtr->nsPtr;
return TclNREvalObjv(interp, copyObjc, copyObjv, TCL_EVAL_INVOKE, NULL);
}
@@ -2598,7 +2598,7 @@ BuildEnsembleConfig(
* Must determine the target for each.
*/
- Tcl_ListObjGetElements(NULL, subList, &subc, &subv);
+ TclListObjGetElements(NULL, subList, &subc, &subv);
if (subList == mapDict) {
/*
* Strange case where explicit list of subcommands is same value
@@ -2992,7 +2992,7 @@ TclCompileEnsemble(
const char *str;
Tcl_Obj *matchObj = NULL;
- if (Tcl_ListObjGetElements(NULL, listObj, &len, &elems) != TCL_OK) {
+ if (TclListObjGetElements(NULL, listObj, &len, &elems) != TCL_OK) {
goto failed;
}
for (i=0 ; i<len ; i++) {
@@ -3112,7 +3112,7 @@ TclCompileEnsemble(
doneMapLookup:
Tcl_ListObjAppendElement(NULL, replaced, replacement);
- if (Tcl_ListObjGetElements(NULL, targetCmdObj, &len, &elems) != TCL_OK) {
+ if (TclListObjGetElements(NULL, targetCmdObj, &len, &elems) != TCL_OK) {
goto failed;
} else if (len != 1) {
/*
@@ -3394,7 +3394,7 @@ CompileToInvokedCommand(
* difference. Hence the call to TclContinuationsEnterDerived...
*/
- Tcl_ListObjGetElements(NULL, replacements, &numWords, &words);
+ TclListObjGetElements(NULL, replacements, &numWords, &words);
for (i = 0, tokPtr = parsePtr->tokenPtr; i < parsePtr->numWords;
i++, tokPtr = TokenAfter(tokPtr)) {
if (i > 0 && i < numWords+1) {