summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkWidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkWidget.c')
-rw-r--r--generic/ttk/ttkWidget.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index c50efc5..d5e0484 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -198,7 +198,7 @@ WidgetInstanceObjCmdDeleted(ClientData clientData)
* Final cleanup for widget; called via Tcl_EventuallyFree().
*/
static void
-FreeWidget(void *memPtr)
+FreeWidget(char *memPtr)
{
ckfree(memPtr);
}
@@ -231,7 +231,7 @@ DestroyWidget(WidgetCore *corePtr)
/* NB: this can reenter the interpreter via a command traces */
Tcl_DeleteCommandFromToken(corePtr->interp, cmd);
}
- Tcl_EventuallyFree(corePtr, (Tcl_FreeProc *) FreeWidget);
+ Tcl_EventuallyFree(corePtr, FreeWidget);
}
/*
@@ -440,8 +440,7 @@ int TtkWidgetConstructorObjCmd(
error:
if (WidgetDestroyed(corePtr)) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "widget has been destroyed", -1));
+ Tcl_SetResult(interp, "Widget has been destroyed", TCL_STATIC);
} else {
Tk_DestroyWindow(tkwin);
}
@@ -635,8 +634,8 @@ int TtkWidgetConfigureCommand(
return status;
if (mask & READONLY_OPTION) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to change read-only option", -1));
+ Tcl_SetResult(interp,
+ "Attempt to change read-only option", TCL_STATIC);
Tk_RestoreSavedOptions(&savedOptions);
return TCL_ERROR;
}
@@ -650,8 +649,7 @@ int TtkWidgetConfigureCommand(
status = corePtr->widgetSpec->postConfigureProc(interp,recordPtr,mask);
if (WidgetDestroyed(corePtr)) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "widget has been destroyed", -1));
+ Tcl_SetResult(interp, "Widget has been destroyed", TCL_STATIC);
status = TCL_ERROR;
}
if (status != TCL_OK) {
@@ -766,8 +764,8 @@ int TtkWidgetIdentifyCommand(
}
if (objc == 5) {
/* $w identify element $x $y */
- if (Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
- sizeof(char *), "option", 0, &what) != TCL_OK)
+ if (Tcl_GetIndexFromObj(interp,objv[2],whatTable,"option",0,&what)
+ != TCL_OK)
{
return TCL_ERROR;
}