summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk3d.c4
-rw-r--r--generic/tkBusy.c4
-rw-r--r--generic/tkButton.c6
-rw-r--r--generic/tkConfig.c4
-rw-r--r--generic/tkConsole.c8
-rw-r--r--generic/tkFocus.c4
-rw-r--r--generic/tkFrame.c4
-rw-r--r--generic/tkImage.c4
-rw-r--r--generic/tkImgBmap.c4
-rw-r--r--generic/tkImgGIF.c4
-rw-r--r--generic/tkImgPNG.c8
-rw-r--r--generic/tkMenubutton.c4
-rw-r--r--generic/tkMessage.c4
-rw-r--r--generic/tkOption.c4
-rw-r--r--generic/ttk/ttkDefaultTheme.c4
-rw-r--r--generic/ttk/ttkImage.c6
-rw-r--r--generic/ttk/ttkInit.c25
-rw-r--r--generic/ttk/ttkLayout.c8
-rw-r--r--generic/ttk/ttkNotebook.c5
-rw-r--r--generic/ttk/ttkPanedwindow.c5
-rw-r--r--generic/ttk/ttkScroll.c20
-rw-r--r--generic/ttk/ttkTheme.c6
-rw-r--r--generic/ttk/ttkTreeview.c12
-rw-r--r--generic/ttk/ttkWidget.c4
24 files changed, 83 insertions, 78 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index dd7ab2f..7609f00 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -624,8 +624,8 @@ Tk_GetReliefFromObj(
* from. */
int *resultPtr) /* Where to place the answer. */
{
- return Tcl_GetIndexFromObj(interp, objPtr, reliefStrings, "relief", 0,
- resultPtr);
+ return Tcl_GetIndexFromObjStruct(interp, objPtr, reliefStrings,
+ sizeof(char), "relief", 0, resultPtr);
}
/*
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 8f73d80..16c5128 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -816,8 +816,8 @@ Tk_BusyObjCmd(
return HoldBusy(busyTablePtr, interp, objv[1], objc-2, objv+2);
}
- 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;
}
switch ((enum options) index) {
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 73e5d4c..94a904d 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -797,8 +797,8 @@ ButtonWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- result = Tcl_GetIndexFromObj(interp, objv[1], commandNames[butPtr->type],
- "option", 0, &index);
+ result = Tcl_GetIndexFromObjStruct(interp, objv[1], commandNames[butPtr->type],
+ sizeof(char), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
@@ -1643,7 +1643,7 @@ ButtonVarProc(
}
butPtr->flags |= SELECTED;
butPtr->flags &= ~TRISTATED;
- } else if (butPtr->offValuePtr
+ } else if (butPtr->offValuePtr
&& strcmp(value, Tcl_GetString(butPtr->offValuePtr)) == 0) {
if (!(butPtr->flags & (SELECTED | TRISTATED))) {
return NULL;
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index b3e76d2..e3a8401 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -737,8 +737,8 @@ DoObjConfig(
case TK_OPTION_STRING_TABLE: {
int newValue;
- if (Tcl_GetIndexFromObj(interp, valuePtr,
- optionPtr->specPtr->clientData,
+ if (Tcl_GetIndexFromObjStruct(interp, valuePtr,
+ optionPtr->specPtr->clientData, sizeof(char),
optionPtr->specPtr->optionName+1, 0, &newValue) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 684c9aa..b78b6aa 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -697,8 +697,8 @@ ConsoleObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &index)
- != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
+ sizeof(char), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -787,8 +787,8 @@ InterpreterObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option arg");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &index)
- != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
+ sizeof(char), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkFocus.c b/generic/tkFocus.c
index cfd2216..bdd953e 100644
--- a/generic/tkFocus.c
+++ b/generic/tkFocus.c
@@ -162,8 +162,8 @@ Tk_FocusObjCmd(
* We have a subcommand to parse and act upon.
*/
- if (Tcl_GetIndexFromObj(interp, objv[1], focusOptions, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], focusOptions,
+ sizeof(char), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (objc != 3) {
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 8bc44ce..2e7081a 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -727,8 +727,8 @@ FrameWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], frameOptions, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], frameOptions,
+ sizeof(char), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
Tcl_Preserve(framePtr);
diff --git a/generic/tkImage.c b/generic/tkImage.c
index ffa6f22..930fb7d 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -234,8 +234,8 @@ Tk_ImageObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], imageOptions, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], imageOptions,
+ sizeof(char), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum options) index) {
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index bbc471e..35a4d0b 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -764,8 +764,8 @@ ImgBmapCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], bmapOptions, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], bmapOptions,
+ sizeof(char), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch (index) {
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index fed4da4..4de086d 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -425,8 +425,8 @@ FileReadGIF(
return TCL_ERROR;
}
for (i = 1; i < argc; i++) {
- if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings, "option name",
- 0, &nBytes) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char), "option name", 0, &nBytes) != TCL_OK) {
return TCL_ERROR;
}
if (i == (argc-1)) {
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index 267b1d9..593ab12 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -801,7 +801,7 @@ SkipChunk(
/*
* 4.3. Summary of standard chunks
*
- * This table summarizes some properties of the standard chunk types.
+ * This table summarizes some properties of the standard chunk types.
*
* Critical chunks (must appear in this order, except PLTE is optional):
*
@@ -2301,8 +2301,8 @@ ParseFormat(
for (; objc>0 ; objc--, objv++) {
int optIndex;
- if (Tcl_GetIndexFromObj(interp, objv[0], fmtOptions, "option", 0,
- &optIndex) == TCL_ERROR) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[0], fmtOptions,
+ sizeof(char), "option", 0, &optIndex) == TCL_ERROR) {
return TCL_ERROR;
}
@@ -3158,7 +3158,7 @@ WriteIDAT(
*destPtr++ = srcPtr[blockPtr->offset[0]];
- /*
+ /*
* If not grayscale, copy the green and blue channels.
*/
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index 6f7869a..8830861 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -355,8 +355,8 @@ MenuButtonWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- result = Tcl_GetIndexFromObj(interp, objv[1], commandNames, "option", 0,
- &index);
+ result = Tcl_GetIndexFromObjStruct(interp, objv[1], commandNames,
+ sizeof(char), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index 5d4ca60..ef07a7c 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -318,8 +318,8 @@ MessageWidgetObjCmd(
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;
}
diff --git a/generic/tkOption.c b/generic/tkOption.c
index ec9e465..9a6b306 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -631,8 +631,8 @@ Tk_OptionObjCmd(
return TCL_ERROR;
}
- result = Tcl_GetIndexFromObj(interp, objv[1], optionCmds, "option", 0,
- &index);
+ result = Tcl_GetIndexFromObjStruct(interp, objv[1], optionCmds,
+ sizeof(char), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index d2deee8..0c55651 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -722,8 +722,8 @@ static void MenubuttonArrowElementDraw(
int width = 0, height = 0;
Tk_GetPixelsFromObj(NULL, tkwin, arrow->sizeObj, &size);
- Tcl_GetIndexFromObj(NULL, arrow->directionObj, directionStrings,
- ""/*message*/, 0/*flags*/, &postDirection);
+ Tcl_GetIndexFromObjStruct(NULL, arrow->directionObj, directionStrings,
+ sizeof(char *), ""/*message*/, 0/*flags*/, &postDirection);
/* ... this might not be such a great idea ... */
switch (postDirection) {
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index 1d455d9..a5a3a52 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -36,7 +36,7 @@ static void NullImageChanged(ClientData clientData,
/* TtkGetImageSpec --
* Constructs a Ttk_ImageSpec * from a Tcl_Obj *.
- * Result must be released using TtkFreeImageSpec.
+ * Result must be released using TtkFreeImageSpec.
*
* TODO: Need a variant of this that takes a user-specified ImageChanged proc
*/
@@ -364,8 +364,8 @@ Ttk_CreateImageElement(
}
#endif
- if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings,
- "option", 0, &option) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char *), "option", 0, &option) != TCL_OK) {
goto error;
}
diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c
index 78676c6..dc6e994 100644
--- a/generic/ttk/ttkInit.c
+++ b/generic/ttk/ttkInit.c
@@ -21,8 +21,8 @@ int Ttk_GetButtonDefaultStateFromObj(
Tcl_Interp *interp, Tcl_Obj *objPtr, int *statePtr)
{
*statePtr = TTK_BUTTON_DEFAULT_DISABLED;
- return Tcl_GetIndexFromObj(interp, objPtr,
- ttkDefaultStrings, "default state", 0, statePtr);
+ return Tcl_GetIndexFromObjStruct(interp, objPtr, ttkDefaultStrings,
+ sizeof(char *), "default state", 0, statePtr);
}
/*
@@ -38,8 +38,8 @@ int Ttk_GetCompoundFromObj(
Tcl_Interp *interp, Tcl_Obj *objPtr, int *statePtr)
{
*statePtr = TTK_COMPOUND_NONE;
- return Tcl_GetIndexFromObj(interp, objPtr,
- ttkCompoundStrings, "compound layout", 0, statePtr);
+ return Tcl_GetIndexFromObjStruct(interp, objPtr, ttkCompoundStrings,
+ sizeof(char *), "compound layout", 0, statePtr);
}
/*
@@ -54,8 +54,8 @@ int Ttk_GetOrientFromObj(
Tcl_Interp *interp, Tcl_Obj *objPtr, int *resultPtr)
{
*resultPtr = TTK_ORIENT_HORIZONTAL;
- return Tcl_GetIndexFromObj(interp, objPtr,
- ttkOrientStrings, "orientation", 0, resultPtr);
+ return Tcl_GetIndexFromObjStruct(interp, objPtr, ttkOrientStrings,
+ sizeof(char *), "orientation", 0, resultPtr);
}
/*
@@ -65,18 +65,18 @@ int Ttk_GetOrientFromObj(
static const char *ttkStateStrings[] = {
"normal", "readonly", "disabled", "active", NULL
};
-enum {
+enum {
TTK_COMPAT_STATE_NORMAL,
TTK_COMPAT_STATE_READONLY,
TTK_COMPAT_STATE_DISABLED,
TTK_COMPAT_STATE_ACTIVE
};
-/* TtkCheckStateOption --
+/* TtkCheckStateOption --
* Handle -state compatibility option.
*
- * NOTE: setting -state disabled / -state enabled affects the
- * widget state, but the internal widget state does *not* affect
+ * NOTE: setting -state disabled / -state enabled affects the
+ * widget state, but the internal widget state does *not* affect
* the value of the -state option.
* This option is present for compatibility only.
*/
@@ -86,7 +86,8 @@ void TtkCheckStateOption(WidgetCore *corePtr, Tcl_Obj *objPtr)
unsigned all = TTK_STATE_DISABLED|TTK_STATE_READONLY|TTK_STATE_ACTIVE;
# define SETFLAGS(f) TtkWidgetChangeState(corePtr, f, all^f)
- (void)Tcl_GetIndexFromObj(NULL,objPtr,ttkStateStrings,"",0,&stateOption);
+ (void)Tcl_GetIndexFromObjStruct(NULL, objPtr, ttkStateStrings,
+ sizeof(char *), "", 0, &stateOption);
switch (stateOption) {
case TTK_COMPAT_STATE_NORMAL:
default:
@@ -174,7 +175,7 @@ int TtkGetOptionValue(
* type name dbName dbClass default objOffset intOffset flags clientData mask
*/
-/* public */
+/* public */
Tk_OptionSpec ttkCoreOptionSpecs[] =
{
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", NULL,
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c
index de9d795..ba24589 100644
--- a/generic/ttk/ttkLayout.c
+++ b/generic/ttk/ttkLayout.c
@@ -636,8 +636,8 @@ Ttk_LayoutTemplate Ttk_ParseLayoutTemplate(Tcl_Interp *interp, Tcl_Obj *objPtr)
if (optName[0] != '-')
break;
- if (Tcl_GetIndexFromObj(
- interp, objv[i], optStrings, "option", 0, &option)
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optStrings,
+ sizeof(char *), "option", 0, &option)
!= TCL_OK)
{
goto error;
@@ -653,8 +653,8 @@ Ttk_LayoutTemplate Ttk_ParseLayoutTemplate(Tcl_Interp *interp, Tcl_Obj *objPtr)
switch (option) {
case OP_SIDE: /* <<NOTE-PACKSIDE>> */
- if (Tcl_GetIndexFromObj(interp, objv[i], packSideStrings,
- "side", 0, &value) != TCL_OK)
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], packSideStrings,
+ sizeof(char *), "side", 0, &value) != TCL_OK)
{
goto error;
}
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 6849135..16a8bfe 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -1058,9 +1058,8 @@ static int NotebookIdentifyCommand(
if ( Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
|| Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK
- || (objc == 5 &&
- Tcl_GetIndexFromObj(interp, objv[2], whatTable, "option", 0, &what)
- != TCL_OK)
+ || (objc == 5 && Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
+ sizeof(char *), "option", 0, &what) != TCL_OK)
) {
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index f4b14c9..adc2aef 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -731,9 +731,8 @@ static int PanedIdentifyCommand(
if ( Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
|| Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK
- || (objc == 5 &&
- Tcl_GetIndexFromObj(interp, objv[2], whatTable, "option", 0, &what)
- != TCL_OK)
+ || (objc == 5 && Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
+ sizeof(char *), "option", 0, &what) != TCL_OK)
) {
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index f596bb4..7ac4f14 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -7,7 +7,7 @@
*
* Scrollable interface:
*
- * + 'first' is controlled by [xy]view widget command
+ * + 'first' is controlled by [xy]view widget command
* and other scrolling commands like 'see';
* + 'total' depends on widget contents;
* + 'last' depends on first, total, and widget size.
@@ -16,15 +16,15 @@
*
* 1. User adjusts scrollbar, scrollbar widget calls its -command
* 2. Scrollbar -command invokes the scrollee [xy]view widget method
- * 3. TtkScrollviewCommand calls TtkScrollTo(), which updates
+ * 3. TtkScrollviewCommand calls TtkScrollTo(), which updates
* 'first' and schedules a redisplay.
- * 4. Once the scrollee knows 'total' and 'last' (typically in
- * the LayoutProc), call TtkScrolled(h,first,last,total) to
+ * 4. Once the scrollee knows 'total' and 'last' (typically in
+ * the LayoutProc), call TtkScrolled(h,first,last,total) to
* synchronize the scrollbar.
* 5. The scrollee -[xy]scrollcommand is called (in an idle callback)
* 6. Which calls the scrollbar 'set' method and redisplays the scrollbar.
*
- * If the scrollee has internal scrolling (e.g., a 'see' method),
+ * If the scrollee has internal scrolling (e.g., a 'see' method),
* it should TtkScrollTo() directly (step 2).
*
* If the widget value changes, it should call TtkScrolled() (step 4).
@@ -78,6 +78,7 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h)
char arg1[TCL_DOUBLE_SPACE + 2];
char arg2[TCL_DOUBLE_SPACE + 2];
int code;
+ Tcl_DString buf;
h->flags &= ~SCROLL_UPDATE_REQUIRED;
@@ -88,9 +89,14 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h)
arg1[0] = arg2[0] = ' ';
Tcl_PrintDouble(interp, (double)s->first / s->total, arg1+1);
Tcl_PrintDouble(interp, (double)s->last / s->total, arg2+1);
+ Tcl_DStringInit(&buf);
+ Tcl_DStringAppend(&buf, s->scrollCmd, -1);
+ Tcl_DStringAppend(&buf, arg1, -1);
+ Tcl_DStringAppend(&buf, arg2, -1);
Tcl_Preserve(corePtr);
- code = Tcl_VarEval(interp, s->scrollCmd, arg1, arg2, NULL);
+ code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL);
+ Tcl_DStringFree(&buf);
if (WidgetDestroyed(corePtr)) {
Tcl_Release(corePtr);
return TCL_ERROR;
@@ -135,7 +141,7 @@ static void UpdateScrollbarBG(ClientData clientData)
void TtkScrolled(ScrollHandle h, int first, int last, int total)
{
Scrollable *s = h->scrollPtr;
-
+
/* Sanity-check inputs:
*/
if (total <= 0) {
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index d102be2..2f95962 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.c
@@ -1394,8 +1394,8 @@ static int StyleThemeCreateCmd(
for (i=4; i < objc; i +=2) {
int option;
- if (Tcl_GetIndexFromObj(
- interp, objv[i], optStrings, "option", 0, &option) != TCL_OK)
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optStrings,
+ sizeof(char *), "option", 0, &option) != TCL_OK)
{
return TCL_ERROR;
}
@@ -1674,7 +1674,7 @@ StyleObjCmd(
return Ttk_InvokeEnsemble(StyleEnsemble, 1, clientData,interp,objc,objv);
}
-MODULE_SCOPE
+MODULE_SCOPE
int Ttk_InvokeEnsemble( /* Run an ensemble command */
const Ttk_Ensemble *ensemble, int cmdIndex,
void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index dc0206c..c1ecf38 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -340,8 +340,8 @@ static int GetEnumSetFromObj(
for (i = 0; i < objc; ++i) {
int index;
- if (TCL_OK != Tcl_GetIndexFromObj(
- interp, objv[i], table, "value", TCL_EXACT, &index))
+ if (TCL_OK != Tcl_GetIndexFromObjStruct(interp, objv[i], table,
+ sizeof(char *), "value", TCL_EXACT, &index))
{
return TCL_ERROR;
}
@@ -2287,8 +2287,8 @@ static int TreeviewIdentifyCommand(
return TCL_ERROR;
}
- if ( Tcl_GetIndexFromObj(interp, objv[2],
- submethodStrings, "command", TCL_EXACT, &submethod) != TCL_OK
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], submethodStrings,
+ sizeof(char *), "command", TCL_EXACT, &submethod) != TCL_OK
|| Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK
|| Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK
) {
@@ -2955,8 +2955,8 @@ static int TreeviewSelectionCommand(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], selopStrings,
- "selection operation", 0, &selop) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], selopStrings,
+ sizeof(char *), "selection operation", 0, &selop) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index 016653d..464be78 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -766,8 +766,8 @@ int TtkWidgetIdentifyCommand(
}
if (objc == 5) {
/* $w identify element $x $y */
- if (Tcl_GetIndexFromObj(interp,objv[2],whatTable,"option",0,&what)
- != TCL_OK)
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
+ sizeof(char *), "option", 0, &what) != TCL_OK)
{
return TCL_ERROR;
}