diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-01 13:12:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-01 13:12:57 (GMT) |
commit | 7ea47b984acc172d762d97583ad57afb44a7e450 (patch) | |
tree | 9422a69eb8231a5b03115916dd4a3d8effb539a5 /generic/tcl.h | |
parent | 27ce2290a6e107aa7e2b8a5995fa32e32106546c (diff) | |
download | tcl-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.h | 5 |
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) |