summaryrefslogtreecommitdiffstats
path: root/lib/hook.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hook.h')
-rw-r--r--lib/hook.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/hook.h b/lib/hook.h
index 19e0f1f..58aa200 100644
--- a/lib/hook.h
+++ b/lib/hook.h
@@ -163,6 +163,8 @@ extern void _hook_unregister(struct hook *hook, void *funcptr, void *arg,
_hook_unregister(&_hook_##hookname, \
_hook_typecheck_arg_##hookname(func), arg, true)
+#define hook_have_hooks(hookname) (_hook_##hookname.entries != NULL)
+
/* invoke hooks
* this is private (static) to the file that has the DEFINE_HOOK statement
*/