647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
|
647
648
649
650
651
652
653
654
655
656
657
658
659
660
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
Tcl_Obj *objPtr = Tcl_GetObjResult(interp);
if (Tcl_IsShared(objPtr)) {
objPtr = Tcl_DuplicateObj(objPtr);
}
Tcl_AppendStringsToObjVA(objPtr, argList);
Tcl_SetObjResult(interp, objPtr);
/*
* Strictly we should call Tcl_GetStringResult(interp) here to make sure
* that interp->result is correct according to the old contract, but that
* makes the performance of much code (e.g. in Tk) absolutely awful. So we
* leave it out; code that really wants interp->result can just insert the
* calls to Tcl_GetStringResult() itself. [Patch 1041072 discussion]
*/
#ifdef USE_INTERP_RESULT
/*
* Ensure that the interp->result is legal so old Tcl 7.* code still
* works. There's still embarrasingly much of it about...
*/
(void) Tcl_GetStringResult(interp);
#endif /* USE_INTERP_RESULT */
}
/*
*----------------------------------------------------------------------
*
* Tcl_AppendResult --
*
|