Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
P-p-H-d committed Apr 29, 2019
1 parent e23691c commit 2d5de1b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions m-array.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define ARRAY_DEF(name, ...) \
ARRAYI_DEF(M_IF_NARGS_EQ1(__VA_ARGS__) \
((name, __VA_ARGS__, M_GLOBAL_OPLIST_OR_DEF(__VA_ARGS__)(), M_C(name,_t), M_C(name,_it_t) ), \
(name, __VA_ARGS__, M_C(name,_t), M_C(name,_it_t))))
(name, __VA_ARGS__, M_C(name,_t), M_C(name,_it_t))))

/* Define the oplist of a dynamic array given its name and its oplist.
USAGE: ARRAY_OPLIST(name[, oplist of the type]) */
Expand All @@ -49,7 +49,7 @@

/* OPLIST definition of a dynamic array */
/* FIXME: Do we want to export some methods as they are slow and
are not fit to be used for building other methods (like _remove)? */
are not fit to be used for building other methods (like _it_remove)? */
#define ARRAYI_OPLIST2(name, oplist) \
(INIT(M_C(name, _init)) \
,INIT_SET(M_C(name, _init_set)) \
Expand Down Expand Up @@ -103,7 +103,7 @@
,M_IF_METHOD(DEL, oplist)(DEL(M_GET_DEL oplist),) \
)

/* Define the contract of an array */
/* Define the internal contract of an array */
#define ARRAYI_CONTRACT(a) do { \
assert (a != NULL); \
assert (a->size <= a->alloc); \
Expand All @@ -119,16 +119,16 @@
typedef struct M_C(name, _s) { \
size_t size; /* Number of elements in the array */ \
size_t alloc; /* Allocated size for the array */ \
type *ptr; /* Pointer to the array */ \
type *ptr; /* Pointer to the array base */ \
} 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); \
\
typedef struct M_C(name, _it_s) { \
size_t index; \
const struct M_C(name, _s) *array; \
size_t index; /* Index of the element */ \
const struct M_C(name, _s) *array; /* Reference of the array */ \
} array_it_t[1]; \
\
static inline void \
Expand Down

0 comments on commit 2d5de1b

Please sign in to comment.