summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-01-13 09:42:57 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-01-13 09:42:57 (GMT)
commitf7489b194766b891ed93052af61d87ab57197122 (patch)
treed7cac63eba7fe66a0cbc5df5d312065bd3c44c7d /generic/tclIndexObj.c
parent4244030b4d1e9e32ce6baa9fa809e21317b8f0d2 (diff)
downloadtcl-f7489b194766b891ed93052af61d87ab57197122.zip
tcl-f7489b194766b891ed93052af61d87ab57197122.tar.gz
tcl-f7489b194766b891ed93052af61d87ab57197122.tar.bz2
Fix shared object panics. [Bug 875395]
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 5891aeb..cf986be 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIndexObj.c,v 1.16 2002/02/28 05:11:25 dgp Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.17 2004/01/13 09:42:57 dkf Exp $
*/
#include "tclInt.h"
@@ -271,7 +271,9 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
* Produce a fancy error message.
*/
int count;
- resultPtr = Tcl_GetObjResult(interp);
+
+ TclNewObj(resultPtr);
+ Tcl_SetObjResult(interp, resultPtr);
Tcl_AppendStringsToObj(resultPtr,
(numAbbrev > 1) ? "ambiguous " : "bad ", msg, " \"",
key, "\": must be ", STRING_AT(tablePtr,offset,0), (char*)NULL);
@@ -450,7 +452,8 @@ Tcl_WrongNumArgs(interp, objc, objv, message)
int i;
register IndexRep *indexRep;
- objPtr = Tcl_GetObjResult(interp);
+ TclNewObj(objPtr);
+ Tcl_SetObjResult(interp, objPtr);
Tcl_AppendToObj(objPtr, "wrong # args: should be \"", -1);
for (i = 0; i < objc; i++) {
/*