diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-07 15:18:46 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-07 15:21:18 +0000 |
| commit | ba2c3606bf35a848183f2280868b305b50632765 (patch) | |
| tree | 17151eebe80f19d0f3dd18ac0269f755f561e189 /config.h | |
| parent | config: 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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |
