diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-02 08:17:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-02 08:17:50 (GMT) |
commit | a6e73bdff10969ba7650f19309abf4a6ee9c041d (patch) | |
tree | 9b1ff6ff3db457ec452f61ebcb38c942c259dc7d /generic/tclListObj.c | |
parent | 7f2e7b48d83365fd7bb943530df2e43ca61bea8d (diff) | |
download | tcl-a6e73bdff10969ba7650f19309abf4a6ee9c041d.zip tcl-a6e73bdff10969ba7650f19309abf4a6ee9c041d.tar.gz tcl-a6e73bdff10969ba7650f19309abf4a6ee9c041d.tar.bz2 |
Another round of refCount consistancy improvements.
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r-- | generic/tclListObj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index bd2dbc4..fa67ee6 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -137,7 +137,7 @@ NewListIntRep( * Creates a list internal rep with space for objc elements. objc * must be > 0. If objv!=NULL, initializes with the first objc values * in that array. If objv==NULL, initalize list internal rep to have - * 0 elements, with space to add objc more. + * 0 elements, with space to add objc more. * * Results: * A new List struct with refCount 0 is returned. If some failure @@ -1726,7 +1726,7 @@ FreeListInternalRep( { List *listRepPtr = ListRepPtr(listPtr); - if (--listRepPtr->refCount <= 0) { + if (listRepPtr->refCount-- <= 1) { Tcl_Obj **elemPtrs = &listRepPtr->elements; int i, numElems = listRepPtr->elemCount; |