diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-04 22:45:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-04 22:45:59 (GMT) |
commit | b203ab7aabea8ebece5250e15db03f9c6f96c2b6 (patch) | |
tree | 431a3e4a40b1c759ee826f2954fb7ac70838c3a5 /generic/tclResult.c | |
parent | e9034f37542010a9dfeb054699ce1c9e74169f59 (diff) | |
parent | eee14742522aed25744851879c80a96134de7369 (diff) | |
download | tcl-b203ab7aabea8ebece5250e15db03f9c6f96c2b6.zip tcl-b203ab7aabea8ebece5250e15db03f9c6f96c2b6.tar.gz tcl-b203ab7aabea8ebece5250e15db03f9c6f96c2b6.tar.bz2 |
Merge trunk
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r-- | generic/tclResult.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c index 76ba02a..c8ffcf2 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -230,7 +230,7 @@ Tcl_GetStringResult( { Interp *iPtr = (Interp *) interp; - return Tcl_GetString(iPtr->objResultPtr); + return TclGetString(iPtr->objResultPtr); } /* @@ -383,12 +383,13 @@ Tcl_AppendElement( Tcl_Obj *elementPtr = Tcl_NewStringObj(element, -1); Tcl_Obj *listPtr = Tcl_NewListObj(1, &elementPtr); const char *bytes; + size_t length; if (Tcl_IsShared(iPtr->objResultPtr)) { Tcl_SetObjResult(interp, Tcl_DuplicateObj(iPtr->objResultPtr)); } - bytes = TclGetString(iPtr->objResultPtr); - if (TclNeedSpace(bytes, bytes+iPtr->objResultPtr->length)) { + bytes = TclGetStringFromObj(iPtr->objResultPtr, &length); + if (TclNeedSpace(bytes, bytes + length)) { Tcl_AppendToObj(iPtr->objResultPtr, " ", 1); } Tcl_AppendObjToObj(iPtr->objResultPtr, listPtr); |