diff options
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 1c7a7f7..3bcc527 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.159 2007/12/13 15:23:21 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.160 2008/03/11 17:23:56 msofer Exp $ */ #include "tclInt.h" @@ -4360,10 +4360,16 @@ TclDeleteNamespaceVars( for (varPtr = VarHashFirstVar(tablePtr, &search); varPtr != NULL; varPtr = VarHashFirstVar(tablePtr, &search)) { + Tcl_Obj *objPtr = Tcl_NewObj(); + Tcl_IncrRefCount(objPtr); + VarHashRefCount(varPtr)++; /* Make sure we get to remove from * hash. */ - UnsetVarStruct(varPtr, NULL, iPtr, /* part1 */ VarHashGetKey(varPtr), + Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, objPtr); + UnsetVarStruct(varPtr, NULL, iPtr, /* part1 */ objPtr, NULL, flags); + Tcl_DecrRefCount(objPtr); /* free no longer needed obj */ + /* * Remove the variable from the table and force it undefined in case |