[svn:parrot] r49194 - branches/gc_massacre/include/parrot
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Sep 21 08:59:24 UTC 2010
Author: bacek
Date: Tue Sep 21 08:59:23 2010
New Revision: 49194
URL: https://trac.parrot.org/parrot/changeset/49194
Log:
Improve LIST_APPEND little bit more.
Modified:
branches/gc_massacre/include/parrot/list.h
Modified: branches/gc_massacre/include/parrot/list.h
==============================================================================
--- branches/gc_massacre/include/parrot/list.h Tue Sep 21 08:21:43 2010 (r49193)
+++ branches/gc_massacre/include/parrot/list.h Tue Sep 21 08:59:23 2010 (r49194)
@@ -51,16 +51,18 @@
do { \
List_Item_Header *_item = (i); \
Linked_List *_list = (l); \
- (_item)->prev = (_item)->next = NULL; \
\
if (_list->last) { \
_item->prev = _list->last; \
_list->last->next = _item; \
} \
- else if (!_list->first) \
+ else if (!_list->first) { \
+ _item->prev = NULL; \
_list->first = _item; \
+ } \
\
_list->last = _item; \
+ _item->next = NULL; \
\
SET_LIST_OWNER(_list, _item) \
_list->count++; \
More information about the parrot-commits
mailing list