summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-27 12:36:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-27 12:36:56 (GMT)
commitb83ed80002d8d8eb676c9f7c81a794e8216e3498 (patch)
treec60953cf292d7784e416ed6fd0555d89d2e6f2c3 /generic/tkCanvas.c
parentfb81bb7d6255f5040661d59559edf32bc997bd6d (diff)
downloadtk-b83ed80002d8d8eb676c9f7c81a794e8216e3498.zip
tk-b83ed80002d8d8eb676c9f7c81a794e8216e3498.tar.gz
tk-b83ed80002d8d8eb676c9f7c81a794e8216e3498.tar.bz2
Eliminate all Tcl_GetIndexFromObj calls, which is only a thin wrapper around Tcl_GetIndexFromObjStruct.
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r--generic/tkCanvas.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 23d8e04..05bc623 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -828,8 +828,8 @@ CanvasWidgetCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
Tcl_Preserve(canvasPtr);
@@ -1887,8 +1887,8 @@ CanvasWidgetCmd(
if (objc < 5) {
Tcl_WrongNumArgs(interp, 2, objv, "mark|dragto x y ?dragGain?");
result = TCL_ERROR;
- } else if (Tcl_GetIndexFromObj(interp, objv[2], optionStrings,
- "scan option", 0, &index) != TCL_OK) {
+ } else if (Tcl_GetIndexFromObjStruct(interp, objv[2], optionStrings,
+ sizeof(char *), "scan option", 0, &index) != TCL_OK) {
result = TCL_ERROR;
} else if ((objc != 5) && (objc != 5+index)) {
Tcl_WrongNumArgs(interp, 3, objv, index?"x y ?gain?":"x y");
@@ -1959,8 +1959,8 @@ CanvasWidgetCmd(
goto done;
}
}
- if (Tcl_GetIndexFromObj(interp, objv[2], optionStrings,
- "select option", 0, &optionindex) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], optionStrings,
+ sizeof(char *), "select option", 0, &optionindex) != TCL_OK) {
result = TCL_ERROR;
goto done;
}
@@ -4301,8 +4301,8 @@ FindItems(
} else {
uid = NULL;
}
- if (Tcl_GetIndexFromObj(interp, objv[first], optionStrings,
- "search command", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[first], optionStrings,
+ sizeof(char *), "search command", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum options) index) {