diff --git a/doc/Container.ods b/doc/Container.ods index 304fe5ef..ab6558b6 100644 Binary files a/doc/Container.ods and b/doc/Container.ods differ diff --git a/m-i-list.h b/m-i-list.h index 6563e7d4..16ea2b91 100644 --- a/m-i-list.h +++ b/m-i-list.h @@ -26,6 +26,7 @@ #define MSTARLIB_I_LIST_H #include "m-core.h" +#include "m-list.h" // For LISTI_ITBASE_DEF /* Interface to add to a structure to enable intrusive doubly-linked support. name: name of the intrusive list. @@ -587,5 +588,8 @@ typedef struct ilist_head_s { it->prev = next; \ ILISTI_CONTRACT(name, list); \ } \ - + \ + LISTI_ITBASE_DEF(name, type, oplist, list_t, list_it_t) + + #endif diff --git a/tests/test-milist.c b/tests/test-milist.c index ba544f19..282dcae7 100644 --- a/tests/test-milist.c +++ b/tests/test-milist.c @@ -35,7 +35,7 @@ typedef struct test_s { #include "coverage.h" START_COVERAGE -ILIST_DEF(ilist_tname, test_t) +ILIST_DEF(ilist_tname, test_t, M_POD_OPLIST) END_COVERAGE ILIST_DEF(ilist_free, test_t, (DEL(free))) @@ -143,6 +143,7 @@ static void test2(void) } assert (ilist_tname_size(list1) == NUM); assert (ilist_tname_size(list2) == 0); + assert (ilist_tname_equal_p(list1, list2) == false); ilist_tname_it_t it; ilist_tname_it (it, list1); for(int i = 0; i < NUM; i++) { @@ -151,6 +152,7 @@ static void test2(void) } assert (ilist_tname_size(list1) == 0); assert (ilist_tname_size(list2) == NUM); + assert (ilist_tname_equal_p(list1, list2) == false); int n = 0; for M_EACH(item, list2, ILIST_OPLIST(ilist_tname)) { assert (n == item->n);