From 97cffdf748033bc48656674844a82e30d9aae794 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 16 Nov 2008 22:22:11 +0000 Subject: change two Tcl_SetResult calls to Tcl_SetObjResult, as simplification for the TIP #340 patch. --- ChangeLog | 6 ++++++ generic/tclTest.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4b6d82..dea3c40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-16 Jan Nijtmans + + * generic/tclTest.c: replace two times Tcl_SetResult with + Tcl_SetObjResult, a little simplification + in preparation for the TIP #340 patch. + 2008-11-13 Jan Nijtmans * generic/tclInt.h: rename static function FSUnloadTempFile to diff --git a/generic/tclTest.c b/generic/tclTest.c index d8c00b6..515d922 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.129 2008/10/17 16:32:58 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.130 2008/11/16 22:22:11 nijtmans Exp $ */ #define TCL_TEST @@ -5891,7 +5891,7 @@ TestFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - char *msg; + const char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -5907,7 +5907,7 @@ TestFilesystemObjCmd( res = Tcl_FSUnregister(&testReportingFilesystem); msg = (res == TCL_OK) ? "unregistered" : "failed"; } - Tcl_SetResult(interp, msg, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(msg , -1)); return res; } @@ -6263,7 +6263,7 @@ TestSimpleFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - char *msg; + const char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6279,7 +6279,7 @@ TestSimpleFilesystemObjCmd( res = Tcl_FSUnregister(&simpleFilesystem); msg = (res == TCL_OK) ? "unregistered" : "failed"; } - Tcl_SetResult(interp, msg, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(msg , -1)); return res; } -- cgit v0.12