95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
#ifdef __GNUC__
# define OF_INLINE inline __attribute__((__always_inline__))
# define OF_LIKELY(cond) (__builtin_expect(!!(cond), 1))
# define OF_UNLIKELY(cond) (__builtin_expect(!!(cond), 0))
# define OF_CONST_FUNC __attribute__((__const__))
# define OF_NO_RETURN_FUNC __attribute__((__noreturn__))
# define OF_WEAK_REF(sym) __attribute__((__weakref__(sym)))
# ifndef OF_DJGPP
# define OF_VISIBILITY_HIDDEN __attribute__((__visibility__("hidden")))
# else
# define OF_VISIBILITY_HIDDEN
# endif
#else
# define OF_INLINE inline
# define OF_LIKELY(cond) (cond)
|
|
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
#ifdef __GNUC__
# define OF_INLINE inline __attribute__((__always_inline__))
# define OF_LIKELY(cond) (__builtin_expect(!!(cond), 1))
# define OF_UNLIKELY(cond) (__builtin_expect(!!(cond), 0))
# define OF_CONST_FUNC __attribute__((__const__))
# define OF_NO_RETURN_FUNC __attribute__((__noreturn__))
# define OF_WEAK_REF(sym) __attribute__((__weakref__(sym)))
# if defined(OF_ELF) || defined(OF_MACHO)
# define OF_VISIBILITY_HIDDEN __attribute__((__visibility__("hidden")))
# else
# define OF_VISIBILITY_HIDDEN
# endif
#else
# define OF_INLINE inline
# define OF_LIKELY(cond) (cond)
|