Add missing _ptr & _srcptr alias.

This commit is contained in:
Patrick Pelissier committed 2018-08-19 17:58:23 +02:00
1 parent 48a970ceb9
commit 3b0e940284
12 files changed
+28 -1

No files matched your search

+2
View File
@@ -109,6 +109,8 @@
size_t size, alloc; \
type *ptr; \
} array_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef type M_C(name, _type_t); \
\
+2
View File
@@ -198,6 +198,8 @@
node_t root; \
size_t size; \
} tree_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
/* Parent Iterator */ \
typedef struct M_C(name, _parent_it_s) { \
+2
View File
@@ -112,6 +112,8 @@ typedef enum {
/* If fixed size, array of elements, otherwise pointer to element */ \
BUFFERI_IF_CTE_SIZE(m_size)(type data[m_size], type *data); \
} buffer_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
static inline void \
M_C(name, _init)(buffer_t v, size_t size) \
+2
View File
@@ -97,6 +97,8 @@
size_t default_size; \
size_t count; \
} deque_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef struct M_C(name, _it_s) { \
node_t *node; \
+4
View File
@@ -190,6 +190,8 @@
size_t used, lower_limit, upper_limit; \
M_C(name, _array_list_pair_t) table; \
} dict_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef struct M_C(name, _it_s) { \
M_C(name, _array_list_pair_it_t) array_it; \
@@ -899,6 +901,8 @@ typedef enum {
size_t upper_limit, lower_limit; \
M_C(name, _pair_t) *data; \
} dict_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef struct M_C(name, _it_s) { \
const struct M_C(name,_s) *dict; \
+2
View File
@@ -132,6 +132,8 @@ typedef struct ilist_head_s {
typedef struct M_C(name, _s) { \
struct ilist_head_s name; \
} list_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef type M_C(name, _type_t); \
\
+2
View File
@@ -126,6 +126,8 @@
struct M_C(name, _s) *next; \
type data; \
} *list_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef type M_C(name, _type_t); \
\
+2
View File
@@ -74,6 +74,8 @@
typedef struct M_C(name, _s) { \
M_C(name, _array_t) array; \
} prioqueue_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef M_C(name, _array_it_t) it_t; \
\
+2
View File
@@ -140,6 +140,8 @@ typedef enum {
size_t size; \
node_t *node; \
} tree_t[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef struct M_C(name, _it_s) { \
node_t *stack[RBTREEI_MAX_STACK]; \
+2
View File
@@ -112,6 +112,8 @@ static inline int sharedi_integer_cref(int *p) { return *p; }
M_GET_TYPE cpt_oplist cpt; /* Counter of how many points to the data */ \
bool combineAlloc; /* Does the data and the ptr share the slot? */ \
} *M_C(name, _t)[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef struct M_C(name, combine_s) { \
type data; \
+2
View File
@@ -127,6 +127,8 @@
M_C(name, _aligned_type_t) data[SNAPSHOTI_SPSC_MAX_BUFFER]; \
atomic_uchar flags; \
} M_C(name, _t)[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr); \
\
typedef type M_C(name, _type_t); \
\
+4 -1
View File
@@ -120,7 +120,10 @@
union { \
M_MAP(VARIANTI_DEFINE_TYPE_ELE , __VA_ARGS__) \
} value; \
} M_C(name,_t)[1];
} M_C(name,_t)[1]; \
typedef struct M_C(name, _s) *M_C(name, _ptr); \
typedef const struct M_C(name, _s) *M_C(name, _srcptr);
#define VARIANTI_DEFINE_UNION_ELE(name, a) \
, M_C3(name, _, VARIANTI_GET_FIELD a)
#define VARIANTI_DEFINE_TYPE_ELE(a) \