libamxc  1.10.3
C Generic Data Containers
amxc_macros.h File Reference

Go to the source code of this file.

Macros

#define PRIVATE   __attribute__ ((visibility("hidden")))
 
#define UNUSED   __attribute__((unused))
 
#define WARN_UNUSED_RETURN   __attribute__ ((warn_unused_result))
 
#define CONSTRUCTOR_LVL(x)   __attribute__((constructor(x)))
 
#define DESTRUCTOR_LVL(x)   __attribute__((destructor(x)))
 
#define CONSTRUCTOR   __attribute__((constructor))
 
#define DESTRUCTOR   __attribute__((destructor))
 
#define when_null(x, l)   if((x) == NULL) { goto l; }
 
#define when_not_null(x, l)   if((x) != NULL) { goto l; }
 
#define when_true(x, l)   if((x)) { goto l; }
 
#define when_false(x, l)   if(!(x)) { goto l; }
 
#define when_failed(x, l)   if((x) != 0) { goto l; }
 
#define when_str_empty(x, l)   if((x) == NULL || *(x) == 0) { goto l; }
 
#define when_null_status(x, l, c)   if((x) == NULL) { c; goto l; }
 
#define when_not_null_status(x, l, c)   if((x) != NULL) { c; goto l; }
 
#define when_true_status(x, l, c)   if((x)) { c; goto l; }
 
#define when_false_status(x, l, c)   if(!(x)) { c; goto l; }
 
#define when_failed_status(x, l, c)   if((x) != 0) { c; goto l; }
 
#define when_str_empty_status(x, l, c)   if((x) == NULL || (x)[0] == '\0') { c; goto l; }
 

Macro Definition Documentation

◆ CONSTRUCTOR

#define CONSTRUCTOR   __attribute__((constructor))

Definition at line 86 of file amxc_macros.h.

◆ CONSTRUCTOR_LVL

#define CONSTRUCTOR_LVL (   x)    __attribute__((constructor(x)))

Definition at line 78 of file amxc_macros.h.

◆ DESTRUCTOR

#define DESTRUCTOR   __attribute__((destructor))

Definition at line 90 of file amxc_macros.h.

◆ DESTRUCTOR_LVL

#define DESTRUCTOR_LVL (   x)    __attribute__((destructor(x)))

Definition at line 82 of file amxc_macros.h.

◆ PRIVATE

#define PRIVATE   __attribute__ ((visibility("hidden")))

Definition at line 66 of file amxc_macros.h.

◆ UNUSED

#define UNUSED   __attribute__((unused))

Definition at line 70 of file amxc_macros.h.

◆ WARN_UNUSED_RETURN

#define WARN_UNUSED_RETURN   __attribute__ ((warn_unused_result))

Definition at line 74 of file amxc_macros.h.

◆ when_failed

#define when_failed (   x,
 
)    if((x) != 0) { goto l; }

Definition at line 142 of file amxc_macros.h.

◆ when_failed_status

#define when_failed_status (   x,
  l,
 
)    if((x) != 0) { c; goto l; }

Definition at line 166 of file amxc_macros.h.

◆ when_false

#define when_false (   x,
 
)    if(!(x)) { goto l; }

Definition at line 138 of file amxc_macros.h.

◆ when_false_status

#define when_false_status (   x,
  l,
 
)    if(!(x)) { c; goto l; }

Definition at line 162 of file amxc_macros.h.

◆ when_not_null

#define when_not_null (   x,
 
)    if((x) != NULL) { goto l; }

Definition at line 130 of file amxc_macros.h.

◆ when_not_null_status

#define when_not_null_status (   x,
  l,
 
)    if((x) != NULL) { c; goto l; }

Definition at line 154 of file amxc_macros.h.

◆ when_null

#define when_null (   x,
 
)    if((x) == NULL) { goto l; }

Definition at line 126 of file amxc_macros.h.

◆ when_null_status

#define when_null_status (   x,
  l,
 
)    if((x) == NULL) { c; goto l; }

Definition at line 150 of file amxc_macros.h.

◆ when_str_empty

#define when_str_empty (   x,
 
)    if((x) == NULL || *(x) == 0) { goto l; }

Definition at line 146 of file amxc_macros.h.

◆ when_str_empty_status

#define when_str_empty_status (   x,
  l,
 
)    if((x) == NULL || (x)[0] == '\0') { c; goto l; }

Definition at line 171 of file amxc_macros.h.

◆ when_true

#define when_true (   x,
 
)    if((x)) { goto l; }

Definition at line 134 of file amxc_macros.h.

◆ when_true_status

#define when_true_status (   x,
  l,
 
)    if((x)) { c; goto l; }

Definition at line 158 of file amxc_macros.h.