Export back NEW / DEL / REALLOC of oplist to container oplist
This commit is contained in:
1 parent
a7a366c4ee
commit
ebf24d41cf
7 files changed
+30
-9
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) \
|
||||
|
||||
+12
-9
@@ -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) \
|
||||
|
||||
@@ -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) \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) \
|
||||
|
||||
Reference in new issue
Block a user