aboutsummaryrefslogtreecommitdiff
path: root/macros.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-02 23:08:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-02 23:08:08 +0000
commit5cc2f94668d2852bbc3de1056526a1b829a32f7f (patch)
treef58e4a29bbad296f265f36048a76090e49c44565 /macros.h
parentrender: mark cell overflowed into as dirty (diff)
parentbox-drawing: drop ‘pragma GCC optimize(“Os”)’ (diff)
Merge branch 'box-drawing'
Closes #198
Diffstat (limited to 'macros.h')
-rw-r--r--macros.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/macros.h b/macros.h
index 323b3748..d4621bd5 100644
--- a/macros.h
+++ b/macros.h
@@ -26,6 +26,18 @@
#define UNUSED
#endif
+#if HAS_ATTRIBUTE(noinline)
+ #define NOINLINE __attribute__((noinline))
+#else
+ #define NOINLINE
+#endif
+
+#if HAS_ATTRIBUTE(const)
+ #define CONST __attribute__((__const__))
+#else
+ #define CONST
+#endif
+
#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(malloc)
#define MALLOC __attribute__((__malloc__))
#else