summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
commit571fd220b0be2da05b1a6e8bb32e0b9a447ed288 (patch)
tree46a3064598e4a36c7ca561f9c08f5d22de4b2b9e /generic/ttk
parented7fb54396eee6e5122bfe611b2a14cf422970fa (diff)
downloadtk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.zip
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.gz
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.bz2
Much more cleaning up of result handling.
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkEntry.c2
-rw-r--r--generic/ttk/ttkImage.c4
-rw-r--r--generic/ttk/ttkState.c5
-rw-r--r--generic/ttk/ttkWidget.c10
4 files changed, 11 insertions, 10 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 6eccf51..ed779dd 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1452,7 +1452,7 @@ EntryGetCommand(
Tcl_WrongNumArgs(interp, 2, objv, NULL);
return TCL_ERROR;
}
- Tcl_SetResult(interp, entryPtr->entry.string, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->entry.string, -1));
return TCL_OK;
}
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index 0de5fc0..3363e4c 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -59,9 +59,9 @@ TtkGetImageSpec(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
if ((objc % 2) != 1) {
if (interp) {
- Tcl_SetResult(interp,
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
"image specification must contain an odd number of elements",
- TCL_STATIC);
+ -1));
}
goto error;
}
diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c
index a71ae21..ab2b7ed 100644
--- a/generic/ttk/ttkState.c
+++ b/generic/ttk/ttkState.c
@@ -241,9 +241,8 @@ Ttk_StateMap Ttk_GetStateMapFromObj(
if (nSpecs % 2 != 0) {
if (interp)
- Tcl_SetResult(interp,
- "State map must have an even number of elements",
- TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "State map must have an even number of elements", -1));
return 0;
}
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index d5e0484..016653d 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -440,7 +440,8 @@ int TtkWidgetConstructorObjCmd(
error:
if (WidgetDestroyed(corePtr)) {
- Tcl_SetResult(interp, "Widget has been destroyed", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "widget has been destroyed", -1));
} else {
Tk_DestroyWindow(tkwin);
}
@@ -634,8 +635,8 @@ int TtkWidgetConfigureCommand(
return status;
if (mask & READONLY_OPTION) {
- Tcl_SetResult(interp,
- "Attempt to change read-only option", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "attempt to change read-only option", -1));
Tk_RestoreSavedOptions(&savedOptions);
return TCL_ERROR;
}
@@ -649,7 +650,8 @@ int TtkWidgetConfigureCommand(
status = corePtr->widgetSpec->postConfigureProc(interp,recordPtr,mask);
if (WidgetDestroyed(corePtr)) {
- Tcl_SetResult(interp, "Widget has been destroyed", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "widget has been destroyed", -1));
status = TCL_ERROR;
}
if (status != TCL_OK) {