summaryrefslogtreecommitdiffstats
path: root/win/tkWinTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-01-28 11:24:03 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-01-28 11:24:03 (GMT)
commited0faca960968dc92e073cfe0b7ae92745026802 (patch)
tree65123df923e2cd33f1a897da5b4a37c2e704270f /win/tkWinTest.c
parent2bffd75c0ab69e169b7bdb7980d27ea3d80b99c9 (diff)
downloadtk-ed0faca960968dc92e073cfe0b7ae92745026802.zip
tk-ed0faca960968dc92e073cfe0b7ae92745026802.tar.gz
tk-ed0faca960968dc92e073cfe0b7ae92745026802.tar.bz2
Convert all Tcl_SetResult calls to Tcl_SetObjResult calls.
Convert Tcl_GetStringFromObj to Tcl_GetString when possible. FossilOrigin-Name: 4c01ee19d4dd413193367ae99f07f40c00aa184e
Diffstat (limited to 'win/tkWinTest.c')
-rw-r--r--win/tkWinTest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index 3dd7d7a..6036995 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -286,7 +286,7 @@ TestwineventCmd(
if (rest == argv[1]) {
hwnd = FindWindowA(NULL, argv[1]);
if (hwnd == NULL) {
- Tcl_SetResult(interp, "no such window", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("no such window", -1));
return TCL_ERROR;
}
}
@@ -341,7 +341,7 @@ TestwineventCmd(
result = SetDlgItemTextA(hwnd, id, Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
if (result == 0) {
- Tcl_SetResult(interp, "failed to send text to dialog: ", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to send text to dialog: ", -1));
AppendSystemError(interp, GetLastError());
return TCL_ERROR;
}
@@ -354,7 +354,7 @@ TestwineventCmd(
lParam = (LPARAM)child;
}
sprintf(buf, "%d", (int) SendMessageA(hwnd, message, wParam, lParam));
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1));
break;
}
default: {
@@ -362,7 +362,7 @@ TestwineventCmd(
sprintf(buf, "%d",
(int) SendDlgItemMessageA(hwnd, id, message, wParam, lParam));
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1));
break;
}
}
@@ -455,7 +455,7 @@ TestgetwindowinfoObjCmd(
cch = GetClassName(INT2PTR(hwnd), buf, cchBuf);
if (cch == 0) {
- Tcl_SetResult(interp, "failed to get class name: ", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to get class name: ", -1));
AppendSystemError(interp, GetLastError());
return TCL_ERROR;
} else {