1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 21:40:34 +02:00

Reorganize source tree and document

This commit is contained in:
Andy Wingo 2023-08-06 12:04:33 +02:00
parent 5fbd21a7c3
commit e6de2fd633
63 changed files with 225 additions and 235 deletions

16
src/assert.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef ASSERT_H
#define ASSERT_H
#define STATIC_ASSERT_EQ(a, b) _Static_assert((a) == (b), "eq")
#define UNLIKELY(e) __builtin_expect(e, 0)
#define LIKELY(e) __builtin_expect(e, 1)
#ifndef NDEBUG
#define ASSERT(x) do { if (UNLIKELY(!(x))) __builtin_trap(); } while (0)
#else
#define ASSERT(x) do { } while (0)
#endif
#define ASSERT_EQ(a,b) ASSERT((a) == (b))
#endif // ASSERT_H