summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-29 18:12:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-29 18:12:45 (GMT)
commit30366b0dd201402a38d55013bfc43b5ed707a2e4 (patch)
tree648c601c0abfad1a47e78182e6ee41bd408a99e0 /generic
parent6fce81dac5a1631e6c8b8e03b5ae7c8493c9c935 (diff)
downloadtcl-30366b0dd201402a38d55013bfc43b5ed707a2e4.zip
tcl-30366b0dd201402a38d55013bfc43b5ed707a2e4.tar.gz
tcl-30366b0dd201402a38d55013bfc43b5ed707a2e4.tar.bz2
two more places where refCount was assumed to be a signed value. In Tcl9 that will probably be not true any more.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclObj.c4
1 files 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);
}
}