From ba2c3606bf35a848183f2280868b305b50632765 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 7 May 2021 17:18:46 +0200 Subject: config: avoid tll() code expansion when generating default bindings tll_push_back() is a macro that results in quite a lot of instructions. Expanding this macro explicitly in many places thus causes code explosion. This is what happened in when we generate the default key/mouse bindings. Fix by calling tll_push_back() in a no-inline function. Reduces code size with ~4-5K --- config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config.h') diff --git a/config.h b/config.h index 8e67d398..db0e6775 100644 --- a/config.h +++ b/config.h @@ -52,6 +52,7 @@ struct config_mouse_binding { int count; struct config_binding_pipe pipe; }; +typedef tll(struct config_mouse_binding) config_mouse_binding_list_t; struct config_spawn_template { char *raw_cmd; @@ -166,7 +167,7 @@ struct config { struct { /* Bindings for "normal" mode */ config_key_binding_list_t key; - tll(struct config_mouse_binding) mouse; + config_mouse_binding_list_t mouse; /* * Special modes -- cgit v1.3