diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 12:36:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 12:36:56 (GMT) |
commit | b83ed80002d8d8eb676c9f7c81a794e8216e3498 (patch) | |
tree | c60953cf292d7784e416ed6fd0555d89d2e6f2c3 /generic/tkFont.c | |
parent | fb81bb7d6255f5040661d59559edf32bc997bd6d (diff) | |
download | tk-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/tkFont.c')
-rw-r--r-- | generic/tkFont.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index 4485df8..ed9b813 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -486,8 +486,8 @@ Tk_FontObjCmd( 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; } @@ -763,8 +763,8 @@ Tk_FontObjCmd( fmPtr->ascent, fmPtr->descent, fmPtr->ascent + fmPtr->descent, fmPtr->fixed)); } else { - if (Tcl_GetIndexFromObj(interp, objv[3], switches, "metric", 0, - &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[3], switches, + sizeof(char *), "metric", 0, &index) != TCL_OK) { Tk_FreeFont(tkfont); return TCL_ERROR; } @@ -3368,8 +3368,8 @@ ConfigAttributesObj( optionPtr = objv[i]; valuePtr = objv[i + 1]; - if (Tcl_GetIndexFromObj(interp, optionPtr, fontOpt, "option", 1, - &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, optionPtr, fontOpt, + sizeof(char *), "option", 1, &index) != TCL_OK) { return TCL_ERROR; } if ((i+2 >= objc) && (objc & 1)) { @@ -3468,8 +3468,8 @@ GetAttributeInfoObj( start = 0; end = FONT_NUMFIELDS; if (objPtr != NULL) { - if (Tcl_GetIndexFromObj(interp, objPtr, fontOpt, "option", TCL_EXACT, - &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objPtr, fontOpt, + sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } start = index; |