diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-24 10:37:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-24 10:37:30 (GMT) |
commit | 51db664c7d3fa5bc0a1c216ac3ee89c1eeba6f09 (patch) | |
tree | 6cd1984366d92404681d2d61d43d3558ae6c0d17 /generic/tclFCmd.c | |
parent | 4462cc72bb42f0c350c2059a67c357a63220e326 (diff) | |
parent | eae252da83b4af0e55e40abefe4e3d7ff8f1a370 (diff) | |
download | tcl-51db664c7d3fa5bc0a1c216ac3ee89c1eeba6f09.zip tcl-51db664c7d3fa5bc0a1c216ac3ee89c1eeba6f09.tar.gz tcl-51db664c7d3fa5bc0a1c216ac3ee89c1eeba6f09.tar.bz2 |
Convert Tcl_GetIndexFromObj implementation to macro
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r-- | generic/tclFCmd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 33c1496..036a82c 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -120,7 +120,7 @@ FileCopyRename( } i++; if ((objc - i) < 2) { - Tcl_WrongNumArgs(interp, 1, objv, + Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? source ?source ...? target"); return TCL_ERROR; } @@ -831,8 +831,8 @@ FileForceOption( if (TclGetString(objv[i])[0] != '-') { break; } - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", TCL_EXACT, - &idx) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[i], options, + sizeof(char *), "option", TCL_EXACT, &idx) != TCL_OK) { return -1; } if (idx == 0 /* -force */) { @@ -1081,8 +1081,8 @@ TclFileAttrsCmd( goto end; } - if (Tcl_GetIndexFromObj(interp, objv[0], attributeStrings, - "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[0], attributeStrings, + sizeof(char *), "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { @@ -1109,8 +1109,8 @@ TclFileAttrsCmd( } for (i = 0; i < objc ; i += 2) { - if (Tcl_GetIndexFromObj(interp, objv[i], attributeStrings, - "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[i], attributeStrings, + sizeof(char *), "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { @@ -1199,8 +1199,8 @@ TclFileLinkCmd( static const char *const linkTypes[] = { "-symbolic", "-hard", NULL }; - if (Tcl_GetIndexFromObj(interp, objv[1], linkTypes, "switch", 0, - &linkAction) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[1], linkTypes, + sizeof(char *), "switch", 0, &linkAction) != TCL_OK) { return TCL_ERROR; } if (linkAction == 0) { |