summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-24 10:37:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-24 10:37:30 (GMT)
commitd8b1866404f460a3010b2cb7db4d7f7c311e2b94 (patch)
tree6cd1984366d92404681d2d61d43d3558ae6c0d17 /generic/tclTestObj.c
parent45c9d1dc2c540809f79ea36c6635ca77787c0df3 (diff)
parent587cef525996192e9c843e36b245ee3e4fcdff18 (diff)
downloadtcl-d8b1866404f460a3010b2cb7db4d7f7c311e2b94.zip
tcl-d8b1866404f460a3010b2cb7db4d7f7c311e2b94.tar.gz
tcl-d8b1866404f460a3010b2cb7db4d7f7c311e2b94.tar.bz2
Convert Tcl_GetIndexFromObj implementation to macro
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r--generic/tclTestObj.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index e61f809..bc1834f 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -172,8 +172,8 @@ TestbignumobjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], subcmds, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], subcmds,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
string = Tcl_GetString(objv[2]);
@@ -554,11 +554,12 @@ TestindexobjCmd(
return TCL_ERROR;
}
- Tcl_GetIndexFromObj(NULL, objv[1], tablePtr, "token", 0, &index);
+ Tcl_GetIndexFromObjStruct(NULL, objv[1], tablePtr,
+ sizeof(char *), "token", 0, &index);
indexRep = objv[1]->internalRep.otherValuePtr;
indexRep->index = index2;
- result = Tcl_GetIndexFromObj(NULL, objv[1],
- tablePtr, "token", 0, &index);
+ result = Tcl_GetIndexFromObjStruct(NULL, objv[1],
+ tablePtr, sizeof(char *), "token", 0, &index);
if (result == TCL_OK) {
Tcl_SetIntObj(Tcl_GetObjResult(interp), index);
}
@@ -598,8 +599,8 @@ TestindexobjCmd(
}
}
- result = Tcl_GetIndexFromObj((setError? interp : NULL), objv[3],
- argv, "token", (allowAbbrev? 0 : TCL_EXACT), &index);
+ result = Tcl_GetIndexFromObjStruct((setError? interp : NULL), objv[3],
+ argv, sizeof(char *), "token", (allowAbbrev? 0 : TCL_EXACT), &index);
ckfree(argv);
if (result == TCL_OK) {
Tcl_SetIntObj(Tcl_GetObjResult(interp), index);
@@ -864,8 +865,8 @@ TestlistobjCmd(
if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) {
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], subcommands, "command",
- 0, &cmdIndex) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], subcommands,
+ sizeof(char *), "command", 0, &cmdIndex) != TCL_OK) {
return TCL_ERROR;
}
switch(cmdIndex) {
@@ -1161,8 +1162,8 @@ TeststringobjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &option)
- != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
+ sizeof(char *), "option", 0, &option) != TCL_OK) {
return TCL_ERROR;
}
switch (option) {