2024-10-24 21:33:05 +01:00
|
|
|
#ifndef BLUELIB_MISB_H_
|
|
|
|
|
#define BLUELIB_MISB_H_
|
2024-08-03 07:54:28 +01:00
|
|
|
|
2024-10-27 15:36:14 +00:00
|
|
|
#ifndef _Nonnull
|
|
|
|
|
#define _Nonnull
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-08-03 07:54:28 +01:00
|
|
|
#define b_unbox(type, box, member) \
|
|
|
|
|
((type *_Nonnull)((box) ? (uintptr_t)(box) - (offsetof(type, member)) : 0))
|
|
|
|
|
|
|
|
|
|
#define z__b_merge_(a, b) a##b
|
|
|
|
|
#define z__b_label_(a) z__b_merge_(__unique_name_, a)
|
|
|
|
|
#define z__b_unique_name() z__b_label_(__LINE__)
|
|
|
|
|
#define z__b_numargs(arg_type, ...) \
|
|
|
|
|
(sizeof((arg_type[]) {__VA_ARGS__}) / sizeof(arg_type))
|
|
|
|
|
|
2024-11-14 16:56:12 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
|
#ifdef BLUELIB_EXPORT
|
|
|
|
|
#define BLUE_API extern __declspec(dllexport)
|
|
|
|
|
#else
|
|
|
|
|
#define BLUE_API extern __declspec(dllimport)
|
|
|
|
|
#endif
|
|
|
|
|
#else
|
|
|
|
|
#define BLUE_API extern
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-10-24 21:33:05 +01:00
|
|
|
#endif // B_MISB_H_
|