2#ifndef __ASE_INTERNAL_HH__
3#define __ASE_INTERNAL_HH__
18#define _(...) ::Ase::ase_gettext (__VA_ARGS__)
23#define APPLY_IDL_PROPERTY(lvalue, rvalue) ASE_OBJECT_APPLY_IDL_PROPERTY(lvalue, rvalue)
26#define ARRAY_SIZE(array) ASE_ARRAY_SIZE (array)
29#define assert_return(expr, ...) do { if (expr) [[likely]] break; ::Ase::assertion_failed (#expr); return __VA_ARGS__; } while (0)
31#define assert_return_unreached(...) do { ::Ase::assertion_failed (""); return __VA_ARGS__; } while (0)
33#define assert_warn(expr) do { if (expr) [[likely]] break; ::Ase::assertion_failed (#expr); } while (0)
35#define assert_paranoid(expr) do { if (expr) [[likely]] break; ::Ase::assertion_failed (#expr); } while (0)
37#define assert_unreached() __builtin_unreachable()
40#define if_constexpr if constexpr
43#define CQUOTE(str) ASE_CQUOTE(str)
52#define MAX(a,b) ((a) >= (b) ? (a) : (b))
55#define MIN(a,b) ((a) <= (b) ? (a) : (b))
58#define CLAMP(v,mi,ma) ((v) < (mi) ? (mi) : ((v) > (ma) ? (ma) : (v)))
61#define ISLIKELY(cond) ASE_ISLIKELY (cond)
63#define UNLIKELY(cond) ASE_UNLIKELY (cond)
66#define ALIGNMENT16(pointer) ASE_ALIGNMENT16 (pointer)
68#define ALIGNED16(pointer) ASE_ALIGNED16 (pointer)
71#define return_unless(cond, ...) ASE_RETURN_UNLESS (cond, __VA_ARGS__)
74#define STRING_VECTOR_FROM_ARRAY(ConstCharArray) ASE_STRING_VECTOR_FROM_ARRAY(ConstCharArray)
77#define TEST_INTEGRITY(FUNC) static void FUNC() __attribute__ ((__cold__, __unused__)); \
78 static ::Ase::Test::IntegrityCheck ASE_CPP_PASTE2 (__Ase__Test__IntegrityCheck__line, __LINE__) { #FUNC, FUNC, 'I' }
81#define TEST_BENCHMARK(FUNC) static void FUNC() __attribute__ ((__cold__, __unused__)); \
82 static ::Ase::Test::IntegrityCheck ASE_CPP_PASTE2 (__Ase__Test__IntegrityCheck__line, __LINE__) { #FUNC, FUNC, 'B' }
86#ifdef ASE_ENABLE_DEBUG
87constexpr const bool __DEV__ =
true;
89constexpr const bool __DEV__ =
false;
96 using TestFunc = void (*) ();
98 name_ (name), func_ (func)
103 static void deferred_init();
The Anklang C++ API namespace.
uint64_t uint64
A 64-bit unsigned integer, use PRI*64 in format strings.
int32_t int32
A 32-bit signed integer.
int16_t int16
A 16-bit signed integer.
uint8_t uint8
An 8-bit unsigned integer.
int8_t int8
An 8-bit signed integer.
int64_t int64
A 64-bit unsigned integer, use PRI*64 in format strings.
uint32_t unichar
A 32-bit unsigned integer used for Unicode characters.
uint16_t uint16
A 16-bit unsigned integer.
uint32_t uint32
A 32-bit unsigned integer.