diff options
author | nicm <nicm> | 2015-12-11 15:46:57 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-12-11 15:46:57 +0000 |
commit | bd5918760ecd1f40a574ccc8a302af869f68c27f (patch) | |
tree | 61937b9355903e6810816eaf4068567df478f36e /tmux.h | |
parent | d7e11d0af78bacc7722998509ac93be7fcffc7b4 (diff) | |
download | rtmux-bd5918760ecd1f40a574ccc8a302af869f68c27f.tar.gz rtmux-bd5918760ecd1f40a574ccc8a302af869f68c27f.tar.bz2 rtmux-bd5918760ecd1f40a574ccc8a302af869f68c27f.zip |
We cannot do hooks_find and then hooks_remove because it might have come
from the parent (global) tree, instead make it remove by name like options.
While here, also tidy up a few bits of options and hooks handling (use
RB_FOREACH_SAFE, and a helper function for the free).
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -703,7 +703,7 @@ struct hook { /* Option data structures. */ struct options_entry { - char *name; + const char *name; enum { OPTIONS_STRING, @@ -1514,7 +1514,7 @@ struct hook *hooks_first(struct hooks *); struct hook *hooks_next(struct hook *); void hooks_add(struct hooks *, const char *, struct cmd_list *); void hooks_copy(struct hooks *, struct hooks *); -void hooks_remove(struct hooks *, struct hook *); +void hooks_remove(struct hooks *, const char *); struct hook *hooks_find(struct hooks *, const char *); void hooks_run(struct hooks *, const char *, struct client *); |