| 563 | } |
| 564 | |
| 565 | void plugin_hook_add_deps(struct plugin_hook *hook, |
| 566 | struct plugin *plugin, |
| 567 | const char *buffer, |
| 568 | const jsmntok_t *before, |
| 569 | const jsmntok_t *after) |
| 570 | { |
| 571 | struct hook_instance *h = NULL; |
| 572 | |
| 573 | /* We just added this, it must exist */ |
| 574 | for (size_t i = 0; i < tal_count(hook->hooks); i++) { |
| 575 | if (!hook->hooks[i]) |
| 576 | continue; |
| 577 | if (hook->hooks[i]->plugin == plugin) { |
| 578 | h = hook->hooks[i]; |
| 579 | break; |
| 580 | } |
| 581 | } |
| 582 | assert(h); |
| 583 | |
| 584 | add_deps(&h->before, buffer, before); |
| 585 | add_deps(&h->after, buffer, after); |
| 586 | } |
| 587 | |
| 588 | struct hook_node { |
| 589 | /* Is this copied into the ordered array yet? */ |
no test coverage detected