| 426 | } |
| 427 | |
| 428 | void plugin_hook_add_deps(struct plugin_hook *hook, |
| 429 | struct plugin *plugin, |
| 430 | const char *buffer, |
| 431 | const jsmntok_t *before, |
| 432 | const jsmntok_t *after) |
| 433 | { |
| 434 | struct hook_instance *h = NULL; |
| 435 | |
| 436 | /* We just added this, it must exist */ |
| 437 | for (size_t i = 0; i < tal_count(hook->hooks); i++) { |
| 438 | if (hook->hooks[i]->plugin == plugin) { |
| 439 | h = hook->hooks[i]; |
| 440 | break; |
| 441 | } |
| 442 | } |
| 443 | assert(h); |
| 444 | |
| 445 | add_deps(&h->before, buffer, before); |
| 446 | add_deps(&h->after, buffer, after); |
| 447 | } |
| 448 | |
| 449 | struct hook_node { |
| 450 | /* Is this copied into the ordered array yet? */ |
no test coverage detected