summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-05-17 15:54:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-05-17 15:54:30 (GMT)
commit249b7853b5d451f99eaebabfc0288176269bf6ba (patch)
tree8f8a87c5748b2877b838a44d70ea70857162cec0 /generic
parent4e04d8c4e5426b6166e7100e72ab3e01b5e71af1 (diff)
parent95e98deaabd9c51b05dc59b6129973ed6bbbf983 (diff)
downloadtk-249b7853b5d451f99eaebabfc0288176269bf6ba.zip
tk-249b7853b5d451f99eaebabfc0288176269bf6ba.tar.gz
tk-249b7853b5d451f99eaebabfc0288176269bf6ba.tar.bz2
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkPack.c22
-rw-r--r--generic/tkPlace.c4
2 files changed, 13 insertions, 13 deletions
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 05a530c..29e4cec 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -224,16 +224,16 @@ Tk_PackObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObjStruct(NULL, objv[1], optionStrings,
- sizeof(char *), "option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(NULL, objv[1], optionStrings,
+ "option", 0, &index) != TCL_OK) {
/*
* Call it again without the deprecated ones to get a proper error
* message. This works well since there can't be any ambiguity between
* deprecated and new options.
*/
- Tcl_GetIndexFromObjStruct(interp, objv[1], optionStringsNoDep,
- sizeof(char *), "option", 0, &index);
+ Tcl_GetIndexFromObj(interp, objv[1], optionStringsNoDep,
+ "option", 0, &index);
return TCL_ERROR;
}
@@ -1206,7 +1206,7 @@ PackAfter(
} else if ((length == 5) && (strcmp(curOpt, "filly")) == 0) {
packPtr->flags |= FILLY;
} else if ((c == 'p') && (strcmp(curOpt, "padx")) == 0) {
- if (optionCount < (index+2)) {
+ if (optionCount <= (index+1)) {
missingPad:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # args: \"%s\" option must be"
@@ -1224,7 +1224,7 @@ PackAfter(
packPtr->iPadX = 0;
index++;
} else if ((c == 'p') && (strcmp(curOpt, "pady")) == 0) {
- if (optionCount < (index+2)) {
+ if (optionCount <= (index+1)) {
goto missingPad;
}
if (TkParsePadAmount(interp, tkwin, options[index+1],
@@ -1237,7 +1237,7 @@ PackAfter(
index++;
} else if ((c == 'f') && (length > 1)
&& (strncmp(curOpt, "frame", length) == 0)) {
- if (optionCount < (index+2)) {
+ if (optionCount <= (index+1)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"wrong # args: \"frame\""
" option must be followed by anchor point", -1));
@@ -1611,8 +1611,8 @@ ConfigureContent(
Tcl_SetErrorCode(interp, "TK", "PACK", "BAD_PARAMETER", NULL);
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
- sizeof(char *), "option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings,
+ "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -1743,8 +1743,8 @@ ConfigureContent(
}
break;
case CONF_SIDE:
- if (Tcl_GetIndexFromObjStruct(interp, objv[i+1], sideNames,
- sizeof(char *), "side", TCL_EXACT, &side) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[i+1], sideNames,
+ "side", TCL_EXACT, &side) != TCL_OK) {
return TCL_ERROR;
}
contentPtr->side = (Side) side;
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index cde51a7..d61045e 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -263,8 +263,8 @@ Tk_PlaceObjCmd(
dispPtr->placeInit = 1;
}
- if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
- sizeof(char *), "option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings,
+ "option", 0, &index) != TCL_OK) {
/*
* Call it again without the deprecated ones to get a proper error
* message. This works well since there can't be any ambiguity between