diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-14 09:40:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-14 09:40:56 (GMT) |
commit | 3ee25b501bc980e710bef83abee8153f62114640 (patch) | |
tree | 4d2ff4839fbd32a8eba452d3d48dc5b1682e9300 /generic/tclInt.h | |
parent | d787284ee18526d2046981d208a0513d480877eb (diff) | |
parent | 4eaff43e124f523dca05591bc760fa9f32eb7672 (diff) | |
download | tcl-3ee25b501bc980e710bef83abee8153f62114640.zip tcl-3ee25b501bc980e710bef83abee8153f62114640.tar.gz tcl-3ee25b501bc980e710bef83abee8153f62114640.tar.bz2 |
Merge trunk.
Add more clarity why refCount should be decremented AFTER checking for <2.
Protect 8.x extensions for being loadable in "novem", by changing Tcl_PkgProvide into a macro.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 7c699c9..742d957 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3934,6 +3934,13 @@ typedef const char *TclDTraceStr; * Invalidate the string rep first so we can use the bytes value for our * pointer chain, and signal an obj deletion (as opposed to shimmering) with * 'length == -1'. + * + * Use do/while0 idiom for optimum correctness without compiler warnings. + * http://c2.com/cgi/wiki?TrivialDoWhileLoop + * + * Decrement refCount AFTER checking it for 0 or 1 (<2), because + * we cannot assume anymore that refCount is a signed type; In + * Tcl8 it was but in Tcl9 it is subject to change. */ # define TclDecrRefCount(objPtr) \ |