Compare commits

..

2 commits

Author SHA1 Message Date
17e458b4e7 . 2026-02-18 22:01:19 -07:00
d17c8ea847 . 2026-02-18 22:00:04 -07:00

View file

@ -9,12 +9,12 @@ typedef void (^__defer_block_t)(void);
static inline void __defer_exec(__defer_block_t *blk) { (*blk)(); } static inline void __defer_exec(__defer_block_t *blk) { (*blk)(); }
#define __cat_2(a, b) a##b #define __concat__2(a, b) a##b
#define __cat_1(a, b) __cat_2(a, b) #define __concat(a, b) __concat__2(a, b)
#define scope_exit \ #define scope_exit \
__attribute__((cleanup(__defer_exec), unused)) \ __attribute__((cleanup(__defer_exec), unused)) \
__defer_block_t __cat_1(_defer_, __LINE__) = ^ __defer_block_t __concat(_defer_, __LINE__) = ^
#define auto __auto_type #define auto __auto_type
@ -36,6 +36,10 @@ typedef uintptr_t uintptr;
typedef size_t usize; typedef size_t usize;
typedef ptrdiff_t ssize; typedef ptrdiff_t ssize;
typedef int64_t sint;
typedef uint64_t uint;
// Thanks AZMR // Thanks AZMR
#define cast(to_type, expr) ((to_type)(expr)) #define cast(to_type, expr) ((to_type)(expr))
#define chkcast(to_type, from_type, expr) _Generic(expr, from_type: (to_type)(expr)) #define chkcast(to_type, from_type, expr) _Generic(expr, from_type: (to_type)(expr))