Skip to content

Commit

Permalink
enable for RELEASE and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Apr 28, 2023
1 parent 83a4709 commit cf7fffa
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions include/re_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,33 +272,33 @@ typedef int re_sock_t;
#endif

/* RE_VA_ARG SIZE helpers */
#if !defined(DISABLE_RE_ARG) && !defined(RELEASE) && \
#if !defined(DISABLE_RE_ARG) && \
!defined(__STRICT_ANSI__) && /* Needs ## trailing comma fix, with C23 \
we can use __VA_OPT__ */ \
__STDC_VERSION__ >= 201112L /* Needs C11 support required */
__STDC_VERSION__ >= 201112L /* _Generic C11 support required */

#define HAVE_RE_ARG 1

#define RE_ARG_SIZE(type) \
_Generic((type), \
bool: sizeof(bool), \
char: sizeof(char), \
unsigned char: sizeof(unsigned char), \
short: sizeof(short), \
unsigned short: sizeof(unsigned short), \
int: sizeof(int), \
unsigned int: sizeof(unsigned int), \
long: sizeof(long), \
unsigned long: sizeof(unsigned long), \
long long: sizeof(long long), \
unsigned long long: sizeof(unsigned long long), \
float: sizeof(float), \
double: sizeof(double), \
char const*: sizeof(char const *), \
char*: sizeof(char *), \
void const*: sizeof(void const *), \
void*: sizeof(void *), \
default: sizeof(void*) \
_Generic((type), \
bool: sizeof(bool), \
char: sizeof(char), \
unsigned char: sizeof(unsigned char), \
short: sizeof(short), \
unsigned short: sizeof(unsigned short), \
int: sizeof(int), \
unsigned int: sizeof(unsigned int), \
long: sizeof(long), \
unsigned long: sizeof(unsigned long), \
long long: sizeof(long long), \
unsigned long long: sizeof(unsigned long long), \
float: sizeof(float), \
double: sizeof(double), \
char const*: sizeof(char const *), \
char*: sizeof(char *), \
void const*: sizeof(void const *), \
void*: sizeof(void *), \
default: sizeof(void*) \
)

#define RE_ARG_0() 0
Expand Down

0 comments on commit cf7fffa

Please sign in to comment.