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 /generic/tkTest.c | |
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 'generic/tkTest.c')
-rw-r--r-- | generic/tkTest.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c index e084a52..13415c4 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -1734,8 +1734,7 @@ TestmenubarCmd( return TCL_OK; #else - Tcl_SetResult(interp, "testmenubar is supported only under Unix", - TCL_STATIC); + Tcl_AppendResult(interp, "testmenubar is supported only under Unix", NULL); return TCL_ERROR; #endif } @@ -1868,7 +1867,7 @@ TestpropCmd( *p = '\n'; } } - Tcl_SetResult(interp, (/*!unsigned*/char*)property, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj((/*!unsigned*/char*)property, -1)); } else { for (p = property; length > 0; length--) { if (actualFormat == 32) { @@ -1939,7 +1938,7 @@ TestwrapperCmd( char buf[TCL_INTEGER_SPACE]; TkpPrintWindowId(buf, Tk_WindowId(wrapperPtr)); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); } return TCL_OK; } @@ -2013,8 +2012,7 @@ CustomOptionSet( string = Tcl_GetStringFromObj((*value), &length); Tcl_UtfToUpper(string); if (strcmp(string, "BAD") == 0) { - Tcl_SetResult(interp, "expected good value, got \"BAD\"", - TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewStringObj("expected good value, got \"BAD\"", -1)); return TCL_ERROR; } } |