Skip to content

Commit

Permalink
types: add RE_ prefix to ARRAY_SIZE() (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored Jan 25, 2023
1 parent 4d8c542 commit e281bc6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/re_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ typedef SSIZE_T ssize_t;
#endif

/** Get number of elements in an array */
#undef ARRAY_SIZE
#define ARRAY_SIZE(a) ((sizeof(a))/(sizeof((a)[0])))
#define RE_ARRAY_SIZE(a) ((sizeof(a))/(sizeof((a)[0])))

/* Backwards compat */
#define ARRAY_SIZE RE_ARRAY_SIZE


/** Align a value to the boundary of mask */
#define ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
Expand Down

0 comments on commit e281bc6

Please sign in to comment.