summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-14 09:40:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-14 09:40:56 (GMT)
commit3ee25b501bc980e710bef83abee8153f62114640 (patch)
tree4d2ff4839fbd32a8eba452d3d48dc5b1682e9300 /generic/tcl.h
parentd787284ee18526d2046981d208a0513d480877eb (diff)
parent4eaff43e124f523dca05591bc760fa9f32eb7672 (diff)
downloadtcl-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/tcl.h')
-rw-r--r--generic/tcl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index f7d54b5..09191df 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2305,6 +2305,10 @@ TCLAPI void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
/*
* 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 Tcl_DecrRefCount(objPtr) \
do { \