summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-10-05 07:56:33 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-10-05 07:56:33 (GMT)
commit2c0bff630ac5b6268ce2a9a3d0fa980d28489824 (patch)
treeb2d0906304f14a10123145871582fd8e69d8c0bb /generic/tclInt.h
parenta50dcb923a50640e31a433c872caa63630d8202d (diff)
parentbfd2f2fbf7a0c7fb68ded3c44b169cb5ce97c24f (diff)
downloadtcl-2c0bff630ac5b6268ce2a9a3d0fa980d28489824.zip
tcl-2c0bff630ac5b6268ce2a9a3d0fa980d28489824.tar.gz
tcl-2c0bff630ac5b6268ce2a9a3d0fa980d28489824.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index f1a6fce..df1fa37 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--;\
+ }\
}
/*