| 552 | } |
| 553 | |
| 554 | void plugin_hook_add_deps(struct plugin_hook *hook, |
| 555 | struct plugin *plugin, |
| 556 | const char *buffer, |
| 557 | const jsmntok_t *before, |
| 558 | const jsmntok_t *after) |
| 559 | { |
| 560 | struct hook_instance *h = NULL; |
| 561 | |
| 562 | /* We just added this, it must exist */ |
| 563 | for (size_t i = 0; i < tal_count(hook->hooks); i++) { |
| 564 | if (!hook->hooks[i]) |
| 565 | continue; |
| 566 | if (hook->hooks[i]->plugin == plugin) { |
| 567 | h = hook->hooks[i]; |
| 568 | break; |
| 569 | } |
| 570 | } |
| 571 | assert(h); |
| 572 | |
| 573 | add_deps(&h->before, buffer, before); |
| 574 | add_deps(&h->after, buffer, after); |
| 575 | } |
| 576 | |
| 577 | struct hook_node { |
| 578 | /* Is this copied into the ordered array yet? */ |
no test coverage detected