summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-07-01 13:12:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-07-01 13:12:57 (GMT)
commitfec1116ba715f2d2d4ec6f0c5a8faa26d9156246 (patch)
tree9422a69eb8231a5b03115916dd4a3d8effb539a5 /generic/tclInt.h
parent73484694b551e1a1332066df5c5e11065e308c21 (diff)
downloadtcl-fec1116ba715f2d2d4ec6f0c5a8faa26d9156246.zip
tcl-fec1116ba715f2d2d4ec6f0c5a8faa26d9156246.tar.gz
tcl-fec1116ba715f2d2d4ec6f0c5a8faa26d9156246.tar.bz2
Don't use internalRep.otherValuePtr any more, twoPtrValue.ptr1 is always a better idea.
A few more consistancies in refcount management.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 2537ad8..356d250 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4039,7 +4039,7 @@ typedef const char *TclDTraceStr;
*/
# define TclDecrRefCount(objPtr) \
- if (--(objPtr)->refCount > 0) ; else { \
+ if ((objPtr)->refCount-- > 1) ; else { \
if (!(objPtr)->typePtr || !(objPtr)->typePtr->freeIntRepProc) { \
TCL_DTRACE_OBJ_FREE(objPtr); \
if ((objPtr)->bytes \
@@ -4679,7 +4679,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
*/
#define TclCleanupCommandMacro(cmdPtr) \
- if (--(cmdPtr)->refCount <= 0) { \
+ if ((cmdPtr)->refCount-- <= 1) { \
ckfree((char *) (cmdPtr));\
}