diff options
author | dgp <dgp@users.sourceforge.net> | 2012-09-12 11:50:05 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-09-12 11:50:05 (GMT) |
commit | f343bffe1a52c61d61cb63fc2773d549dfb8d433 (patch) | |
tree | ccee2d429f9df7109c09ebf9fa28c03d4847379f | |
parent | 63e5f2312a7cd7ff30d4361aa0a03f38d9bd90b6 (diff) | |
parent | 3110959c6f9095d249c2991f9f41fb27fa900c1a (diff) | |
download | tcl-f343bffe1a52c61d61cb63fc2773d549dfb8d433.zip tcl-f343bffe1a52c61d61cb63fc2773d549dfb8d433.tar.gz tcl-f343bffe1a52c61d61cb63fc2773d549dfb8d433.tar.bz2 |
merge trunk
-rw-r--r-- | generic/tclInt.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 1c10695..a0629c6 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -801,13 +801,17 @@ typedef struct VarInHash { #define TclSetVarNamespaceVar(varPtr) \ if (!TclIsVarNamespaceVar(varPtr)) {\ (varPtr)->flags |= VAR_NAMESPACE_VAR;\ - ((VarInHash *)(varPtr))->refCount++;\ + if (TclIsVarInHash(varPtr)) {\ + ((VarInHash *)(varPtr))->refCount++;\ + }\ } #define TclClearVarNamespaceVar(varPtr) \ if (TclIsVarNamespaceVar(varPtr)) {\ (varPtr)->flags &= ~VAR_NAMESPACE_VAR;\ - ((VarInHash *)(varPtr))->refCount--;\ + if (TclIsVarInHash(varPtr)) {\ + ((VarInHash *)(varPtr))->refCount--;\ + }\ } /* |