summaryrefslogtreecommitdiffstats
path: root/generic/tclOODefineCmds.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/tclOODefineCmds.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/tclOODefineCmds.c')
-rw-r--r--generic/tclOODefineCmds.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index c1115be..4b97740 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -865,7 +865,7 @@ MagicDefinitionInvoke(
Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr);
/* TODO: overflow? */
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc - offset, objv + offset);
- Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs);
+ TclListObjGetElements(NULL, objPtr, &dummy, &objs);
result = Tcl_EvalObjv(interp, objc - cmdIndex, objs, TCL_EVAL_INVOKE);
if (isRoot) {
@@ -1908,7 +1908,7 @@ ClassFilterSet(
"attempt to misuse API", -1));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
- } else if (Tcl_ListObjGetElements(interp, objv[0], &filterc,
+ } else if (TclListObjGetElements(interp, objv[0], &filterc,
&filterv) != TCL_OK) {
return TCL_ERROR;
}
@@ -1991,7 +1991,7 @@ ClassMixinSet(
"attempt to misuse API", -1));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
- } else if (Tcl_ListObjGetElements(interp, objv[0], &mixinc,
+ } else if (TclListObjGetElements(interp, objv[0], &mixinc,
&mixinv) != TCL_OK) {
return TCL_ERROR;
}
@@ -2100,7 +2100,7 @@ ClassSuperSet(
"may not modify the superclass of the root object", -1));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
- } else if (Tcl_ListObjGetElements(interp, objv[0], &superc,
+ } else if (TclListObjGetElements(interp, objv[0], &superc,
&superv) != TCL_OK) {
return TCL_ERROR;
}
@@ -2259,7 +2259,7 @@ ClassVarsSet(
"attempt to misuse API", -1));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
- } else if (Tcl_ListObjGetElements(interp, objv[0], &varc,
+ } else if (TclListObjGetElements(interp, objv[0], &varc,
&varv) != TCL_OK) {
return TCL_ERROR;
}
@@ -2388,7 +2388,7 @@ ObjFilterSet(
return TCL_ERROR;
}
objv += Tcl_ObjectContextSkippedArgs(context);
- if (Tcl_ListObjGetElements(interp, objv[0], &filterc,
+ if (TclListObjGetElements(interp, objv[0], &filterc,
&filterv) != TCL_OK) {
return TCL_ERROR;
}
@@ -2461,7 +2461,7 @@ ObjMixinSet(
return TCL_ERROR;
}
objv += Tcl_ObjectContextSkippedArgs(context);
- if (Tcl_ListObjGetElements(interp, objv[0], &mixinc,
+ if (TclListObjGetElements(interp, objv[0], &mixinc,
&mixinv) != TCL_OK) {
return TCL_ERROR;
}
@@ -2540,7 +2540,7 @@ ObjVarsSet(
return TCL_ERROR;
}
objv += Tcl_ObjectContextSkippedArgs(context);
- if (Tcl_ListObjGetElements(interp, objv[0], &varc,
+ if (TclListObjGetElements(interp, objv[0], &varc,
&varv) != TCL_OK) {
return TCL_ERROR;
}