From be60925512e642d383cdd2af3ba6e46493ddd54e Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 11 Aug 2006 15:16:21 +0000 Subject: It seems that the original submitter of the patch didn't test it. Add a critical buffer reset so that nested namespaces get the right fullName... --- generic/tclNamesp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 66b857e..15ed318 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,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.96 2006/08/11 13:50:23 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.97 2006/08/11 15:16:21 dkf Exp $ */ #include "tclInt.h" @@ -860,6 +860,14 @@ Tcl_CreateNamespace( Tcl_DStringLength(namePtr)); /* + * Clear the unwanted buffer or we end up appending to previous + * results, making the namespace fullNames of nested namespaces + * very wrong (and strange). + */ + + Tcl_DStringSetLength(namePtr, 0); + + /* * Now swap the buffer pointers so that we build in the other * buffer. This is faster than repeated copying back and forth * between buffers. -- cgit v0.12