summaryrefslogtreecommitdiffstats
path: root/src/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/macros.h b/src/macros.h
index 9a3d4e13cf..2ac705d4a1 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -373,3 +373,9 @@
# define ESTACK_CHECK_NOW
# define CHECK_CURBUF
#endif
+
+// Inline the condition for performance.
+#define CHECK_LIST_MATERIALIZE(l) if ((l)->lv_first == &range_list_item) range_list_materialize(l)
+
+// Inlined version of ga_grow(). Especially useful if "n" is a constant.
+#define GA_GROW(gap, n) (((gap)->ga_maxlen - (gap)->ga_len < n) ? ga_grow_inner((gap), (n)) : OK)