| 47 | } |
| 48 | |
| 49 | static struct plugin_hook *plugin_hook_by_name(const char *name) |
| 50 | { |
| 51 | size_t num_hooks; |
| 52 | struct plugin_hook **hooks = get_hooks(&num_hooks); |
| 53 | |
| 54 | for (size_t i=0; i<num_hooks; i++) |
| 55 | if (streq(hooks[i]->name, name)) |
| 56 | return hooks[i]; |
| 57 | return NULL; |
| 58 | } |
| 59 | |
| 60 | /* When we destroy a plugin, we NULL out any hooks it registered */ |
| 61 | static void remove_hook_instance(const struct hook_instance *h, |
no test coverage detected