diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-08-26 08:39:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-08-26 08:39:47 (GMT) |
commit | 3f4897852c302eb336547bdda59ab890dc43e823 (patch) | |
tree | 7b051d25ff4428add82ffa22a71da704fb1000a1 /generic | |
parent | 2a48cc8339e254c85a4879e73946dc2b8e73593f (diff) | |
download | tcl-3f4897852c302eb336547bdda59ab890dc43e823.zip tcl-3f4897852c302eb336547bdda59ab890dc43e823.tar.gz tcl-3f4897852c302eb336547bdda59ab890dc43e823.tar.bz2 |
Fix crashes when running Snit's test suite caused by traces forcing the interp
result object to become shared.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclNamesp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 3367af9..89a8381 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -21,7 +21,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.81 2005/07/26 16:21:31 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.82 2005/08/26 08:39:49 dkf Exp $ */ #include "tclInt.h" @@ -4895,9 +4895,12 @@ NamespaceEnsembleCmd(dummy, interp, objc, objv) Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); /* - * Tricky! Rely on the object result not being shared! + * Tricky! Must ensure that the result is not shared (command delete + * traces could have corrupted the pristine object that we started + * with). [Snit test rename-1.5] */ + Tcl_ResetResult(interp); Tcl_GetCommandFullName(interp, token, Tcl_GetObjResult(interp)); return TCL_OK; } |