Add GENTYPE operator to all oplists
This commit is contained in:
1 parent
5ceb34d980
commit
422f3c2c04
18 files changed
+24
-26
No files matched your search
@@ -89,7 +89,7 @@
|
||||
,INIT_MOVE(M_F(name, _init_move)) \
|
||||
,MOVE(M_F(name, _move)) \
|
||||
,SWAP(M_F(name, _swap)) \
|
||||
,TYPE(M_F(name,_ct)) \
|
||||
,TYPE(M_F(name,_ct)) , GENTYPE(struct M_F(name,_s)*) \
|
||||
,NAME(name) \
|
||||
,SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
,EMPTY_P(M_F(name,_empty_p)) \
|
||||
|
||||
+2
-2
@@ -166,7 +166,7 @@
|
||||
MOVE(M_F(name, _move)), \
|
||||
SWAP(M_F(name, _swap)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
SUBTYPE(M_F(name, _subtype_ct)), \
|
||||
IT_TYPE(M_F(name, _it_ct)), \
|
||||
IT_FIRST(M_F(name,_it)), \
|
||||
@@ -215,7 +215,7 @@
|
||||
MOVE(M_F(name, _move)), \
|
||||
SWAP(M_F(name, _swap)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
SUBTYPE(M_F(name, _subtype_ct)), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
IT_TYPE(M_F(name, _it_ct)), \
|
||||
|
||||
+1
-1
@@ -1308,7 +1308,7 @@ M_F(name, _init)(buffer_t v, size_t size) \
|
||||
,SET(M_F(name, _set)) \
|
||||
,CLEAR(M_F(name, _clear)) \
|
||||
,NAME(name) \
|
||||
,TYPE(M_F(name,_ct)) \
|
||||
,TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*) \
|
||||
,SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
,RESET(M_F(name,_reset)) \
|
||||
,PUSH(M_F(name,_push)) \
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@
|
||||
,M_IF_METHOD(MOVE, oplist)(MOVE(M_F(name, _move)),) \
|
||||
,M_IF_METHOD(SWAP,oplist)(SWAP(M_F(name, _swap)),) \
|
||||
,NAME(name) \
|
||||
,TYPE(M_F(name,_ct)) \
|
||||
,TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*) \
|
||||
,SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
,OPLIST(oplist) \
|
||||
,M_IF_METHOD(EMPTY_P, oplist)(EMPTY_P(M_F(name,_empty_p)),) \
|
||||
|
||||
@@ -1104,7 +1104,7 @@
|
||||
,MOVE(M_F(name, _move)) \
|
||||
,SWAP(M_F(name, _swap)) \
|
||||
,NAME(name) \
|
||||
,TYPE(M_F(name,_ct)) \
|
||||
,TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*) \
|
||||
,SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
,EMPTY_P(M_F(name,_empty_p)) \
|
||||
,IT_TYPE(M_F(name,_it_ct)) \
|
||||
|
||||
@@ -1071,7 +1071,7 @@
|
||||
SWAP(M_F(name, _swap)), \
|
||||
RESET(M_F(name, _reset)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name, _ct)), \
|
||||
TYPE(M_F(name, _ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
SUBTYPE(M_F(name, _subtype_ct)), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
IT_TYPE(M_F(name, _it_ct)), \
|
||||
@@ -1126,7 +1126,7 @@
|
||||
SWAP(M_F(name, _swap)), \
|
||||
RESET(M_F(name, _reset)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name, _ct)), \
|
||||
TYPE(M_F(name, _ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
SUBTYPE(M_F(name, _subtype_ct)), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
PUSH(M_F(name,_push)), \
|
||||
|
||||
+2
-2
@@ -111,7 +111,7 @@
|
||||
/* Specialization of the OPLIST in function if there is at least one member or not */
|
||||
#define M_FUNC0BJ_INS_NO_ATTR_OPLIST(name) ( \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name, _ct)), \
|
||||
TYPE(M_F(name, _ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
CLEAR(M_F(name, _clear)), \
|
||||
INIT(M_F(name,_init)) \
|
||||
)
|
||||
@@ -127,7 +127,7 @@
|
||||
/* Define the oplist of the instance */
|
||||
#define M_FUNC0BJ_INS_ATTR_OPLIST_P3(name, ...) ( \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name, _ct)), \
|
||||
TYPE(M_F(name, _ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
INIT_WITH(M_F(name, _init_with)), \
|
||||
CLEAR(M_F(name, _clear)), \
|
||||
M_IF_METHOD_ALL(INIT, __VA_ARGS__)(INIT(M_F(name,_init)),), \
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ typedef struct m_il1st_head_s {
|
||||
INIT_MOVE(M_F(name, _init_move)), \
|
||||
MOVE(M_F(name, _move)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
RESET(M_F(name,_reset)), \
|
||||
SUBTYPE(M_F(name,_subtype_ct)), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ M_BEGIN_PROTECTED_CODE
|
||||
CLEAR(M_F(name, _clear)), \
|
||||
RESET(M_F(name, _reset) M_IPTR), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name, _ct)), \
|
||||
TYPE(M_F(name, _ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
OPLIST(oplist), \
|
||||
SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
INIT_MOVE(M_F(name, _init_move)), \
|
||||
SWAP(M_F(name, _swap)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)**), \
|
||||
SUBTYPE(M_F(name,_subtype_ct)), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
IT_TYPE(M_F(name, _it_ct)), \
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@
|
||||
,MOVE(M_F(name, _move)) \
|
||||
,SWAP(M_F(name, _swap)) \
|
||||
,NAME(name) \
|
||||
,TYPE(M_F(name,_ct)) \
|
||||
,TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*) \
|
||||
,SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
,RESET(M_F(name,_reset)) \
|
||||
,PUSH(M_F(name,_push)) \
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@
|
||||
MOVE(M_F(name, _move)), \
|
||||
SWAP(M_F(name, _swap)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
SUBTYPE(M_F(name, _subtype_ct)), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
GET_SIZE(M_F(name, _size)), \
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ M_BEGIN_PROTECTED_CODE
|
||||
MOVE(M_F(name, _move)), \
|
||||
SWAP(M_F(name, _swap)) \
|
||||
,NAME(name) \
|
||||
,TYPE(M_F(name, _ct)) \
|
||||
,TYPE(M_F(name, _ct)), GENTYPE(struct M_F(name,_s)*) \
|
||||
)
|
||||
|
||||
// OPLIST to handle a counter of atomic type
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ M_BEGIN_PROTECTED_CODE
|
||||
,SET(M_F(name, _set)) \
|
||||
,CLEAR(M_F(name, _clear)) \
|
||||
,NAME(name) \
|
||||
,TYPE(M_F(name, _ct)) \
|
||||
,TYPE(M_F(name, _ct)) , GENTYPE(struct M_F(name,_s)*) \
|
||||
,SUBTYPE(M_F(name, _subtype_ct)) \
|
||||
,OPLIST(oplist) \
|
||||
,M_IF_METHOD(INIT_MOVE, oplist)(INIT_MOVE(M_F(name, _init_move)),) \
|
||||
|
||||
+3
-3
@@ -2101,7 +2101,7 @@ namespace m_lib {
|
||||
SWAP(m_string_swap), RESET(m_string_reset), \
|
||||
EMPTY_P(m_string_empty_p), \
|
||||
CLEAR(m_string_clear), HASH(m_string_hash), EQUAL(m_string_equal_p), \
|
||||
CMP(m_string_cmp), TYPE(m_string_t), GENTYPE(struct m_string_s *), \
|
||||
CMP(m_string_cmp), TYPE(m_string_t), GENTYPE(struct m_string_s*), \
|
||||
PARSE_STR(m_string_parse_str), GET_STR(m_string_get_str), \
|
||||
OUT_STR(m_string_out_str), IN_STR(m_string_in_str), \
|
||||
OUT_SERIAL(m_string_out_serial), IN_SERIAL(m_string_in_serial), \
|
||||
@@ -2197,7 +2197,7 @@ namespace m_lib {
|
||||
/* Set the string a to the string (or C string) b */
|
||||
#define m_string_set(a,b) M_STR1NG_SELECT2(m_string_set, m_string_set_cstr, a, b)
|
||||
|
||||
/* Concatene the string (or C string) b to the string a */
|
||||
/* Concatenate the string (or C string) b to the string a */
|
||||
#define m_string_cat(a,b) M_STR1NG_SELECT2(m_string_cat, m_string_cat_cstr, a, b)
|
||||
|
||||
/* Compare the string a to the string (or C string) b and return the sort order */
|
||||
@@ -2273,7 +2273,7 @@ namespace m_lib {
|
||||
HASH(M_F(name,_hash)), \
|
||||
EQUAL(M_F(name,_equal_p)), \
|
||||
CMP(M_F(name,_cmp)), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
OOR_EQUAL(M_F(name,_oor_equal_p)), \
|
||||
OOR_SET(M_F(name, _oor_set)), \
|
||||
PARSE_STR(M_F(name,_parse_str)), \
|
||||
|
||||
@@ -750,7 +750,7 @@ namespace m_lib {
|
||||
SET(M_F(name,_set)), \
|
||||
CLEAR(M_F(name, _clear)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
OPLIST( (__VA_ARGS__) ), \
|
||||
M_IF_METHOD_ALL(CMP, __VA_ARGS__)(CMP(M_F(name, _cmp)),), \
|
||||
M_IF_METHOD_ALL(HASH, __VA_ARGS__)(HASH(M_F(name, _hash)),), \
|
||||
|
||||
+1
-1
@@ -774,7 +774,7 @@ M_INLINE void \
|
||||
CLEAR(M_F(name, _clear)), \
|
||||
RESET(M_F(name, _reset)), \
|
||||
NAME(name), \
|
||||
TYPE(M_F(name,_ct)), \
|
||||
TYPE(M_F(name,_ct)), GENTYPE(struct M_F(name,_s)*), \
|
||||
EMPTY_P(M_F(name,_empty_p)), \
|
||||
M_IF_METHOD_ALL(HASH, __VA_ARGS__)(HASH(M_F(name, _hash)),), \
|
||||
M_IF_METHOD_ALL(EQUAL, __VA_ARGS__)(EQUAL(M_F(name, _equal_p)),), \
|
||||
|
||||
@@ -53,8 +53,6 @@ const string_t gx;
|
||||
CLEAR(M_NOTHING_DEFAULT) )
|
||||
#define INT1 (GENTYPE(int), TYPE(int), INIT(M_INIT_BASIC), INIT_SET(M_SET_BASIC), SET(M_SET_BASIC), \
|
||||
CLEAR(M_NOTHING_DEFAULT) )
|
||||
#define ARRAY1 M_OPEXTEND(M_OPL_array_int_t(), GENTYPE(struct array_int_s *))
|
||||
#define LIST1 M_OPEXTEND(M_OPL_list_int_t(), GENTYPE(struct list_int_s **))
|
||||
|
||||
//NOTE: string_t is registered by the CORE component of the MLIB organization
|
||||
|
||||
@@ -65,9 +63,9 @@ const string_t gx;
|
||||
|
||||
#define M_GENERIC_ORG_3() (ARRAY)
|
||||
#define M_GENERIC_ORG_ARRAY_COMP_5() (AINT)
|
||||
#define M_GENERIC_ORG_ARRAY_COMP_AINT_OPLIST_6() ARRAY1
|
||||
#define M_GENERIC_ORG_ARRAY_COMP_AINT_OPLIST_6() M_OPL_array_int_t()
|
||||
#define M_GENERIC_ORG_ARRAY_COMP_10() (LINT)
|
||||
#define M_GENERIC_ORG_ARRAY_COMP_LINT_OPLIST_30() LIST1
|
||||
#define M_GENERIC_ORG_ARRAY_COMP_LINT_OPLIST_30() M_OPL_list_int_t()
|
||||
|
||||
static bool test_empty(const string_t p)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user