summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-11-23 00:12:46 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-11-23 00:12:46 (GMT)
commitc3c073a77aa192334001c69c623b4a79168fa7cc (patch)
treee204a79e13d4a8e43b4da41aea237cda64c38487 /generic/tclResult.c
parenta9978f9939fde53bb358508c8955974f11790c46 (diff)
downloadtcl-c3c073a77aa192334001c69c623b4a79168fa7cc.zip
tcl-c3c073a77aa192334001c69c623b4a79168fa7cc.tar.gz
tcl-c3c073a77aa192334001c69c623b4a79168fa7cc.tar.bz2
Remove call to Tcl_GetStringResult to speed up processing of [$canv postscript]
and other repeated callers of Tcl_AppendResult(). [Patch 1041072]
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r--generic/tclResult.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index c549330..28f994d 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.22 2004/11/13 00:19:10 dgp Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.23 2004/11/23 00:12:57 dkf Exp $
*/
#include "tclInt.h"
@@ -630,10 +630,22 @@ Tcl_AppendResultVA(interp, argList)
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_DIRECT_INTERP_RESULT_ACCESS
+ /*
* 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_DIRECT_INTERP_RESULT_ACCESS */
}
/*