diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2005-10-31 19:54:56 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2005-10-31 19:54:56 (GMT) |
commit | 62aad9ad2f44dc2addaf0ba6a0d95713a8ca44b3 (patch) | |
tree | 5b385c9f830efe50f13e55db7d0569e24fc5ee4e /generic/tclNamesp.c | |
parent | 6e9ae3f8a0c8d09d9742fd61d5734965ed8bf68d (diff) | |
download | tcl-62aad9ad2f44dc2addaf0ba6a0d95713a8ca44b3.zip tcl-62aad9ad2f44dc2addaf0ba6a0d95713a8ca44b3.tar.gz tcl-62aad9ad2f44dc2addaf0ba6a0d95713a8ca44b3.tar.bz2 |
* generic/tclNamesp.c: fix for [Bugs 1338280/1337229]. Thanks Don.
* tests/trace.test: fix duplicate test numbers
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. */ |