diff options
author | dgp <dgp@users.sourceforge.net> | 2012-11-17 00:25:23 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-11-17 00:25:23 (GMT) |
commit | 35a4980629e819d1f5a36c04c4f994fccbb19124 (patch) | |
tree | ecfb08ffab13a3bb4730bf93ae551dd608c332af /generic/tclInt.h | |
parent | fd54c8a9d81e0a3758b2029ab0d8d962a9038e14 (diff) | |
parent | 809f3d7568286e5221fdc48fecf9ad9b5c5b1173 (diff) | |
download | tcl-35a4980629e819d1f5a36c04c4f994fccbb19124.zip tcl-35a4980629e819d1f5a36c04c4f994fccbb19124.tar.gz tcl-35a4980629e819d1f5a36c04c4f994fccbb19124.tar.bz2 |
WIP removing the maintenance of a string result in the Interp.
Still some head-scratching on what to do with tclStubLib.c.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 45 |
1 files changed, 8 insertions, 37 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index d548a16..7ed9bdf 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -1804,27 +1804,16 @@ typedef struct Interp { * Tcl_Interp struct (see tcl.h). If you change one, be sure to change the * other. * - * The interpreter's result is held in both the string and the - * objResultPtr fields. These fields hold, respectively, the result's - * string or object value. The interpreter's result is always in the - * result field if that is non-empty, otherwise it is in objResultPtr. - * The two fields are kept consistent unless some C code sets - * interp->result directly. Programs should not access result and - * objResultPtr directly; instead, they should always get and set the - * result using procedures such as Tcl_SetObjResult, Tcl_GetObjResult, and - * Tcl_GetStringResult. See the SetResult man page for details. + * The interpreter's result is held in the objResultPtr field. This field + * holds the result's object value. The interpreter's result is always in + * objResultPtr. Programs should not access objResultPtr directly; + * instead, they should always get and set the result using procedures + * such as Tcl_SetObjResult, Tcl_GetObjResult, and Tcl_GetStringResult. + * See the SetResult man page for details. */ - char *result; /* If the last command returned a string - * result, this points to it. Should not be - * accessed directly; see comment above. */ - Tcl_FreeProc *freeProc; /* Zero means a string result is statically - * allocated. TCL_DYNAMIC means string result - * was allocated with ckalloc and should be - * freed with ckfree. Other values give - * address of procedure to invoke to free the - * string result. Tcl_Eval must free it before - * executing next command. */ + char *unused3; + Tcl_FreeProc *unused4; int errorLine; /* When TCL_ERROR is returned, this gives the * line number in the command where the error * occurred (1 means first line). */ @@ -1847,8 +1836,6 @@ typedef struct Interp { ClientData interpInfo; /* Information used by tclInterp.c to keep * track of master/slave interps on a * per-interp basis. */ - Tcl_HashTable unused2; /* No longer used (was mathFuncTable) */ - /* * Information related to procedures and variables. See tclProc.c and * tclVar.c for usage. @@ -1878,19 +1865,6 @@ typedef struct Interp { * TCL_EVAL_INVOKE call to Tcl_EvalObjv. */ /* - * Information used by Tcl_AppendResult to keep track of partial results. - * See Tcl_AppendResult code for details. - */ - - char *appendResult; /* Storage space for results generated by - * Tcl_AppendResult. Ckalloc-ed. NULL means - * not yet allocated. */ - int appendAvl; /* Total amount of space available at - * partialResult. */ - int appendUsed; /* Number of non-null bytes currently stored - * at partialResult. */ - - /* * Information about packages. Used only in tclPkg.c. */ @@ -1912,7 +1886,6 @@ typedef struct Interp { * Normally zero, but may be set before * calling Tcl_Eval. See below for valid * values. */ - int unused1; /* No longer used (was termOffset) */ LiteralTable literalTable; /* Contains LiteralEntry's describing all Tcl * objects holding literals of scripts * compiled by the interpreter. Indexed by the @@ -1950,8 +1923,6 @@ typedef struct Interp { * string. Returned by Tcl_ObjSetVar2 when * variable traces change a variable in a * gross way. */ - char resultSpace[TCL_RESULT_SIZE+1]; - /* Static space holding small results. */ Tcl_Obj *objResultPtr; /* If the last command returned an object * result, this points to it. Should not be * accessed directly; see comment above. */ |