Subject: two more places where refCount was assumed to be a signed value. In Tcl9 that will probably be not true any more.

From: "jan.nijtmans" <[email-masked]>
Date: Sat, 29 Dec 2012 18:12:45 +0000

---
 generic/tclObj.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/generic/tclObj.c b/generic/tclObj.c
index 03141e4..7841bcf 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -3784,7 +3784,7 @@ Tcl_DbDecrRefCount(
 	 * If the Tcl_Obj is going to be deleted, remove the entry.
 	 */
 
-	if ((objPtr->refCount - 1) <= 0) {
+	if (objPtr->refCount < 2) {
 	    ObjData *objData = Tcl_GetHashValue(hPtr);
 
 	    if (objData != NULL) {
@@ -3797,7 +3797,7 @@ Tcl_DbDecrRefCount(
 # endif /* TCL_THREADS */
 #endif /* TCL_MEM_DEBUG */
 
-    if (--(objPtr)->refCount <= 0) {
+    if ((objPtr)->refCount-- < 2) {
 	TclFreeObj(objPtr);
     }
 }
-- 
cgit v0.12