diff options
author | dgp <dgp@users.sourceforge.net> | 2008-10-02 20:59:45 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-10-02 20:59:45 (GMT) |
commit | 1c72973d895e9efb23ecda2553cee0a5a901f650 (patch) | |
tree | 8a07cbfafbc8c5b8fea073e97921199f1cd90377 /generic/tclUtil.c | |
parent | 5e54f02d48ca1b26bb819e05b20b49b8012224d4 (diff) | |
download | tcl-1c72973d895e9efb23ecda2553cee0a5a901f650.zip tcl-1c72973d895e9efb23ecda2553cee0a5a901f650.tar.gz tcl-1c72973d895e9efb23ecda2553cee0a5a901f650.tar.bz2 |
TIP #330 IMPLEMENTATION
* generic/tcl.h: Remove the "result" and "freeProc" fields
* generic/tclBasic.c: from the default public declaration of the
* generic/tclResult.c: Tcl_Interp struct. Code should no longer
* generic/tclStubLib.c: be accessing these fields. Access can be
* generic/tclTest.c: restored by defining USE_INTERP_RESULT, but
* generic/tclUtil.c: that should only be a temporary migration aid.
*** POTENTIAL INCOMPATIBILITY ***
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 22b9e73..1a93a32 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.103 2008/08/22 18:01:00 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.104 2008/10/02 20:59:45 dgp Exp $ */ #include "tclInt.h" @@ -2065,14 +2065,15 @@ Tcl_DStringResult( Tcl_DString *dsPtr) /* Dynamic string that is to become the * result of interp. */ { + Interp* iPtr = (Interp*) interp; Tcl_ResetResult(interp); if (dsPtr->string != dsPtr->staticSpace) { - interp->result = dsPtr->string; - interp->freeProc = TCL_DYNAMIC; + iPtr->result = dsPtr->string; + iPtr->freeProc = TCL_DYNAMIC; } else if (dsPtr->length < TCL_RESULT_SIZE) { - interp->result = ((Interp *) interp)->resultSpace; - strcpy(interp->result, dsPtr->string); + iPtr->result = iPtr->resultSpace; + strcpy(iPtr->result, dsPtr->string); } else { Tcl_SetResult(interp, dsPtr->string, TCL_VOLATILE); } |