summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-11 17:12:18 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-11 17:12:18 +0200
commit8ed4e3457904eb4dacc193d0152e690ab3b2ffdb (patch)
tree07ae4b27b93568b9e72f695df7136d34c3a4a354
parent9ea4368ff1e4842286e0e7a6aec58a2c2c799d5b (diff)
lib: expose ut_invoke() in the module interface
This allows invoking other functions from module code. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--lib.c1
-rw-r--r--module.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 9dfeb1e..64ac653 100644
--- a/lib.c
+++ b/lib.c
@@ -1761,6 +1761,7 @@ const struct ut_ops ut = {
.set_type = ut_set_extended_type,
.get_type = ut_get_extended_type,
.new_object = ut_new_object,
+ .invoke = ut_invoke,
};
static const struct { const char *name; ut_c_fn *func; } functions[] = {
diff --git a/module.h b/module.h
index 5e73fd9..c768461 100644
--- a/module.h
+++ b/module.h
@@ -26,6 +26,7 @@ struct ut_ops {
struct json_object *(*set_type)(struct json_object *, struct json_object *, const char *, void *);
void **(*get_type)(struct json_object *, const char *);
struct json_object *(*new_object)(struct json_object *);
+ struct json_object *(*invoke)(struct ut_state *, uint32_t, struct json_object *, struct json_object *, struct json_object *);
};
extern const struct ut_ops ut;