diff --git a/m-array.h b/m-array.h index d4f9a2bd..72491531 100644 --- a/m-array.h +++ b/m-array.h @@ -81,6 +81,9 @@ ,M_IF_METHOD(IN_STR, oplist)(IN_STR(M_C3(array_, name, _in_str)),) \ ,M_IF_METHOD(EQUAL, oplist)(EQUAL(M_C3(array_, type, _equal_p)),) \ ,M_IF_METHOD(HASH, oplist)(HASH(M_C3(array_, type, _hash)),) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) // Compute alloc from the requested size. diff --git a/m-dict.h b/m-dict.h index d652d860..a51b80d2 100644 --- a/m-dict.h +++ b/m-dict.h @@ -520,6 +520,9 @@ ,M_IF_METHOD(EQUAL, value_oplist)(EQUAL(M_C3(dict_, name, _equal_p)),) \ ,KEY_OPLIST(key_oplist) \ ,VALUE_OPLIST(value_oplist) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) #define DICTI_LOWER_BOUND(s) ((s) <= DICTI_INITIAL_SIZE ? 0 : (s) * 1 / 4) diff --git a/m-i-list.h b/m-i-list.h index aba472b0..b3610c12 100644 --- a/m-i-list.h +++ b/m-i-list.h @@ -84,6 +84,9 @@ typedef struct ilist_head_s { OPLIST(oplist), \ PUSH(M_C3(ilist_,name,_push_back)), \ POP(M_C3(ilist_,name,_pop_back)) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) #define ILISTI_DEF2(name, type, oplist) \ diff --git a/m-i-shared.h b/m-i-shared.h index 87eb2504..8f1cb724 100644 --- a/m-i-shared.h +++ b/m-i-shared.h @@ -56,15 +56,18 @@ /********************************** INTERNAL ************************************/ -#define ISHAREDI_PTR_OPLIST(name, oplist) ( \ - INIT(M_INIT_DEFAULT), \ - INIT_SET(M_C3(ishared_, name, _init_set2) M_IPTR), \ - SET(M_C3(ishared_, name, _set) M_IPTR), \ - CLEAR(M_C3(ishared_, name, _clear)), \ - CLEAN(M_C3(ishared_, name, _clean) M_IPTR), \ - TYPE(M_C3(ishared_,name,_t)), \ - OPLIST(oplist), \ - SUBTYPE(M_C3(ishared_type_,name,_t)), \ +#define ISHAREDI_PTR_OPLIST(name, oplist) ( \ + INIT(M_INIT_DEFAULT), \ + INIT_SET(M_C3(ishared_, name, _init_set2) M_IPTR), \ + SET(M_C3(ishared_, name, _set) M_IPTR), \ + CLEAR(M_C3(ishared_, name, _clear)), \ + CLEAN(M_C3(ishared_, name, _clean) M_IPTR), \ + TYPE(M_C3(ishared_,name,_t)), \ + OPLIST(oplist), \ + SUBTYPE(M_C3(ishared_type_,name,_t)) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) #define ISHAREDI_PTR_DEF2(name, type, oplist) \ diff --git a/m-list.h b/m-list.h index ddfb2f6b..b43bb085 100644 --- a/m-list.h +++ b/m-list.h @@ -79,6 +79,9 @@ ,M_IF_METHOD(IN_STR, oplist)(IN_STR(M_C3(list_, name, _in_str)),) \ ,M_IF_METHOD(EQUAL, oplist)(EQUAL(M_C3(list_, name, _equal_p)),) \ ,M_IF_METHOD(HASH, oplist)(HASH(M_C3(list_, name, _hash)),) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) #define LISTI_DEF2(name, type, oplist) \ diff --git a/m-rbtree.h b/m-rbtree.h index d02f94e8..09b3e633 100644 --- a/m-rbtree.h +++ b/m-rbtree.h @@ -83,6 +83,9 @@ M_IF_METHOD(IN_STR, oplist)(IN_STR(M_C3(rbtree_, name, _in_str)),), \ M_IF_METHOD(EQUAL, oplist)(EQUAL(M_C3(rbtree_, name, _equal_p)),), \ M_IF_METHOD(HASH, oplist)(HASH(M_C3(rbtree_, name, _hash)),) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) /* Max depth of the binary tree diff --git a/m-shared.h b/m-shared.h index 21ba777f..ca18a92b 100644 --- a/m-shared.h +++ b/m-shared.h @@ -58,6 +58,9 @@ CLEAN(M_C3(shared_, name, _clean)), \ MOVE(M_C3(shared_, name, _move)), \ SWAP(M_C3(shared_, name, _swap)) \ + ,M_IF_METHOD(NEW, oplist)(NEW(M_GET_NEW oplist),) \ + ,M_IF_METHOD(REALLOC, oplist)(REALLOC(M_GET_REALLOC oplist),) \ + ,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \ ) #define SHAREDI_PTR_DEF2(name, type, oplist) \