summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-09-12 11:50:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-09-12 11:50:05 (GMT)
commitf343bffe1a52c61d61cb63fc2773d549dfb8d433 (patch)
treeccee2d429f9df7109c09ebf9fa28c03d4847379f
parent63e5f2312a7cd7ff30d4361aa0a03f38d9bd90b6 (diff)
parent3110959c6f9095d249c2991f9f41fb27fa900c1a (diff)
downloadtcl-f343bffe1a52c61d61cb63fc2773d549dfb8d433.zip
tcl-f343bffe1a52c61d61cb63fc2773d549dfb8d433.tar.gz
tcl-f343bffe1a52c61d61cb63fc2773d549dfb8d433.tar.bz2
merge trunk
-rw-r--r--generic/tclInt.h8
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--;\
+ }\
}
/*