diff options
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 2acedcb..456f335 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.84 2005/09/14 18:35:56 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.85 2005/10/31 19:54:56 msofer Exp $ */ #include "tclInt.h" @@ -1019,15 +1019,6 @@ TclTeardownNamespace(nsPtr) int i; /* - * Start by destroying the namespace's variable table, since variables - * might trigger traces. Variable table should be cleared but not freed! - * TclDeleteVars frees it, so we reinitialize it afterwards. - */ - - TclDeleteVars(iPtr, &nsPtr->varTable); - Tcl_InitHashTable(&nsPtr->varTable, TCL_STRING_KEYS); - - /* * Delete all commands in this namespace. Be careful when traversing the * hash table: when each command is deleted, it removes itself from the * command table. @@ -1058,6 +1049,15 @@ TclTeardownNamespace(nsPtr) nsPtr->parentPtr = NULL; /* + * Destroy the namespace's variable table + * Variable table should be cleared but not freed! + * TclDeleteVars frees it, so we reinitialize it afterwards. + */ + + TclDeleteVars(iPtr, &nsPtr->varTable); + Tcl_InitHashTable(&nsPtr->varTable, TCL_STRING_KEYS); + + /* * Delete the namespace path if one is installed. */ |