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 | 98e5f4f56dafc01c976dcdd68656d34dfa4ee071 (patch) | |
| tree | 5b385c9f830efe50f13e55db7d0569e24fc5ee4e /generic/tclNamesp.c | |
| parent | 223d0653df9babc72d2cceff49b8da7336fc29c2 (diff) | |
| download | tcl-98e5f4f56dafc01c976dcdd68656d34dfa4ee071.zip tcl-98e5f4f56dafc01c976dcdd68656d34dfa4ee071.tar.gz tcl-98e5f4f56dafc01c976dcdd68656d34dfa4ee071.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.       */  | 
