summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-27 18:32:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-27 18:32:14 (GMT)
commit0d12754dbe6102188981d9d78ca772201250947b (patch)
treed9ac97eac3ae2c7f2ffe55c456dff83270d6e1e1 /generic
parent3b9139924b1097de66255cd243de80d6eccb46ba (diff)
downloadtcl-0d12754dbe6102188981d9d78ca772201250947b.zip
tcl-0d12754dbe6102188981d9d78ca772201250947b.tar.gz
tcl-0d12754dbe6102188981d9d78ca772201250947b.tar.bz2
FreeListInternalRep() cleanup.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclListObj.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 036d624..3b9dce6 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1623,16 +1623,14 @@ static void
FreeListInternalRep(
Tcl_Obj *listPtr) /* List object with internal rep to free. */
{
- register List *listRepPtr = ListRepPtr(listPtr);
- register Tcl_Obj **elemPtrs = &listRepPtr->elements;
- register Tcl_Obj *objPtr;
- int numElems = listRepPtr->elemCount;
- int i;
+ List *listRepPtr = ListRepPtr(listPtr);
if (--listRepPtr->refCount <= 0) {
+ Tcl_Obj **elemPtrs = &listRepPtr->elements;
+ int i, numElems = listRepPtr->elemCount;
+
for (i = 0; i < numElems; i++) {
- objPtr = elemPtrs[i];
- Tcl_DecrRefCount(objPtr);
+ Tcl_DecrRefCount(elemPtrs[i]);
}
ckfree((char *) listRepPtr);
}