diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-29 18:12:45 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-29 18:12:45 (GMT) |
| commit | aef36bf11d4ad79a6f2e6691f132fd4c444822df (patch) | |
| tree | 648c601c0abfad1a47e78182e6ee41bd408a99e0 | |
| parent | 0dc45b9fe32757b2732fb96074bc20110b636a0d (diff) | |
| download | tcl-aef36bf11d4ad79a6f2e6691f132fd4c444822df.zip tcl-aef36bf11d4ad79a6f2e6691f132fd4c444822df.tar.gz tcl-aef36bf11d4ad79a6f2e6691f132fd4c444822df.tar.bz2 | |
two more places where refCount was assumed to be a signed value. In Tcl9 that will probably be not true any more.
| -rw-r--r-- | generic/tclObj.c | 4 |
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); } } |
