summaryrefslogtreecommitdiffstats
path: root/win/tkWinTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-28 11:24:03 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-28 11:24:03 (GMT)
commitf5cd036029ec84c3e42c672341d77ca013afbc71 (patch)
tree65123df923e2cd33f1a897da5b4a37c2e704270f /win/tkWinTest.c
parent13e6c44129865089d8680474141354555450ae04 (diff)
downloadtk-f5cd036029ec84c3e42c672341d77ca013afbc71.zip
tk-f5cd036029ec84c3e42c672341d77ca013afbc71.tar.gz
tk-f5cd036029ec84c3e42c672341d77ca013afbc71.tar.bz2
Convert all Tcl_SetResult calls to Tcl_SetObjResult calls.
Convert Tcl_GetStringFromObj to Tcl_GetString when possible.
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 {