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/tcl.h | |
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/tcl.h')
-rw-r--r-- | generic/tcl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 39c578a..abe1157 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.270 2008/09/03 05:43:31 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.271 2008/10/02 20:59:45 dgp Exp $ */ #ifndef _TCL @@ -458,6 +458,8 @@ typedef struct stat Tcl_StatBuf; */ typedef struct Tcl_Interp { + /* TIP #330: Strongly discourage extensions from using the string result. */ +#ifdef USE_INTERP_RESULT char *result; /* If the last command returned a string * result, this points to it. */ void (*freeProc) (char *blockPtr); @@ -468,6 +470,10 @@ typedef struct Tcl_Interp { * of function to invoke to free the result. * Tcl_Eval must free it before executing next * command. */ +#else + char* unused3; + void (*unused4) (char*); +#endif int errorLine; /* When TCL_ERROR is returned, this gives the * line number within the command where the * error occurred (1 if first line). */ |