aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-07 15:18:46 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-07 15:21:18 +0000
commitba2c3606bf35a848183f2280868b305b50632765 (patch)
tree17151eebe80f19d0f3dd18ac0269f755f561e189 /config.h
parentconfig: don’t inline str_to_*() functions (diff)
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
Diffstat (limited to 'config.h')
-rw-r--r--config.h3
1 files changed, 2 insertions, 1 deletions
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