summaryrefslogtreecommitdiffstats
path: root/generic/tcl.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)
commit7ea47b984acc172d762d97583ad57afb44a7e450 (patch)
tree9422a69eb8231a5b03115916dd4a3d8effb539a5 /generic/tcl.h
parent27ce2290a6e107aa7e2b8a5995fa32e32106546c (diff)
downloadtcl-7ea47b984acc172d762d97583ad57afb44a7e450.zip
tcl-7ea47b984acc172d762d97583ad57afb44a7e450.tar.gz
tcl-7ea47b984acc172d762d97583ad57afb44a7e450.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/tcl.h')
-rw-r--r--generic/tcl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index f0d7c9a..1f7b5cb 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -816,7 +816,8 @@ typedef struct Tcl_Obj {
union { /* The internal representation: */
long longValue; /* - an long integer value. */
double doubleValue; /* - a double-precision floating value. */
- void *otherValuePtr; /* - another, type-specific value. */
+ void *otherValuePtr; /* - another, type-specific value,
+ not used internally any more. */
Tcl_WideInt wideValue; /* - a long long value. */
struct { /* - internal rep as two pointers.
* the main use of which is a bignum's
@@ -2509,7 +2510,7 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
# define Tcl_DecrRefCount(objPtr) \
do { \
Tcl_Obj *_objPtr = (objPtr); \
- if (--(_objPtr)->refCount <= 0) { \
+ if ((_objPtr)->refCount-- <= 1) { \
TclFreeObj(_objPtr); \
} \
} while(0)