mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
plugin: Add hook registration
I might have gone a bit overboard with the type-checking, but typesafe_cb_cast is quite nice to use, so why not. The macro to register a new hook encapsulates the entire flow from param serialization, to dispatch, parsing and callback dispatch in one bundle. I was tempted to have the callback outside of the registration, but it's unlikely that we'll have two calls to the same hook with different callbacks. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
025fbbc9ea
commit
f8f76e3d31
6
lightningd/plugin_hook.c
Normal file
6
lightningd/plugin_hook.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <lightningd/plugin_hook.h>
|
||||
|
||||
void plugin_hook_call_(struct lightningd *ld, const struct plugin_hook *hook,
|
||||
void *payload, void *cb_arg)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user