diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-28 11:24:03 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-28 11:24:03 (GMT) |
commit | f5cd036029ec84c3e42c672341d77ca013afbc71 (patch) | |
tree | 65123df923e2cd33f1a897da5b4a37c2e704270f /win | |
parent | 13e6c44129865089d8680474141354555450ae04 (diff) | |
download | tk-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')
-rw-r--r-- | win/tkWinDialog.c | 2 | ||||
-rw-r--r-- | win/tkWinMenu.c | 2 | ||||
-rw-r--r-- | win/tkWinTest.c | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 069247e..3b1351e 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -1134,7 +1134,7 @@ MakeFilter( FileFilter *filterPtr; if (initialPtr) { - initial = Tcl_GetStringFromObj(initialPtr, NULL); + initial = Tcl_GetString(initialPtr); } TkInitFileFilters(&flist); if (TkGetFileFilters(interp, &flist, valuePtr, 1) != TCL_OK) { diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 26f08f4..b7b5598 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -1948,7 +1948,7 @@ DrawMenuUnderline( if (mePtr->underline < len) { const char *label, *start, *end; - label = Tcl_GetStringFromObj(mePtr->labelPtr, NULL); + label = Tcl_GetString(mePtr->labelPtr); start = Tcl_UtfAtIndex(label, mePtr->underline); end = Tcl_UtfNext(start); Tk_UnderlineChars(menuPtr->display, d, 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 { |