diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-06-23 19:39:37 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-07-11 15:49:14 +0200 |
commit | 01795764e95983e416f5db14dd5599206b9ea41b (patch) | |
tree | 48d0bb9d4d13ea86d0fc387275b73cc4a8565a8f /lib | |
parent | 98b9c84a369b9f9fa2ee0c87724fcc2066aa0d65 (diff) |
lib: rename uc_add_proto_functions() to uc_add_functions()
The naming is an artifact from before the introduction of the new type
system. In the current code, there is nothing special about prototypes,
they're simple object values.
Also introduce a new singular uc_add_function() convenience macro while
we're at it.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.c | 2 | ||||
-rw-r--r-- | lib/math.c | 2 | ||||
-rw-r--r-- | lib/ubus.c | 2 | ||||
-rw-r--r-- | lib/uci.c | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -906,7 +906,7 @@ static void close_dir(void *ud) void uc_module_init(uc_vm *vm, uc_value_t *scope) { - uc_add_proto_functions(scope, global_fns); + uc_add_functions(scope, global_fns); proc_type = uc_declare_type(vm, "fs.proc", proc_fns, close_proc); file_type = uc_declare_type(vm, "fs.file", file_fns, close_file); @@ -160,5 +160,5 @@ static const uc_cfunction_list math_fns[] = { void uc_module_init(uc_vm *vm, uc_value_t *scope) { - uc_add_proto_functions(scope, math_fns); + uc_add_functions(scope, math_fns); } @@ -322,7 +322,7 @@ static void close_connection(void *ud) { void uc_module_init(uc_vm *vm, uc_value_t *scope) { - uc_add_proto_functions(scope, global_fns); + uc_add_functions(scope, global_fns); conn_type = uc_declare_type(vm, "ubus.connection", conn_fns, close_connection); } @@ -1007,7 +1007,7 @@ static void close_uci(void *ud) { void uc_module_init(uc_vm *vm, uc_value_t *scope) { - uc_add_proto_functions(scope, global_fns); + uc_add_functions(scope, global_fns); cursor_type = uc_declare_type(vm, "uci.cursor", cursor_fns, close_uci); } |