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