summaryrefslogtreecommitdiffhomepage
path: root/lib/ubus.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-09 19:58:37 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-11 15:49:14 +0200
commitff52440341bcb8c61105ff144bfcb210315207e4 (patch)
treeb7eb1c47cb8034e5188b86f480e3e61f44ee6ced /lib/ubus.c
parent1d60418132460c23b216a2f8a9e0ea8897d32ea4 (diff)
treewide: consolidate typedef naming
Ensure that all custom typedef and vector declaration type names end with a "_t" suffix. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib/ubus.c')
-rw-r--r--lib/ubus.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/ubus.c b/lib/ubus.c
index 933ef3a..d1b2c8c 100644
--- a/lib/ubus.c
+++ b/lib/ubus.c
@@ -33,7 +33,7 @@ typedef struct {
} ubus_connection;
static uc_value_t *
-uc_ubus_error(uc_vm *vm, size_t nargs)
+uc_ubus_error(uc_vm_t *vm, size_t nargs)
{
uc_value_t *errmsg;
@@ -47,10 +47,10 @@ uc_ubus_error(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_blob_to_json(uc_vm *vm, struct blob_attr *attr, bool table, const char **name);
+uc_blob_to_json(uc_vm_t *vm, struct blob_attr *attr, bool table, const char **name);
static uc_value_t *
-uc_blob_array_to_json(uc_vm *vm, struct blob_attr *attr, size_t len, bool table)
+uc_blob_array_to_json(uc_vm_t *vm, struct blob_attr *attr, size_t len, bool table)
{
uc_value_t *o = table ? ucv_object_new(vm) : ucv_array_new(vm);
uc_value_t *v;
@@ -77,7 +77,7 @@ uc_blob_array_to_json(uc_vm *vm, struct blob_attr *attr, size_t len, bool table)
}
static uc_value_t *
-uc_blob_to_json(uc_vm *vm, struct blob_attr *attr, bool table, const char **name)
+uc_blob_to_json(uc_vm_t *vm, struct blob_attr *attr, bool table, const char **name)
{
void *data;
int len;
@@ -131,7 +131,7 @@ uc_blob_to_json(uc_vm *vm, struct blob_attr *attr, bool table, const char **name
static uc_value_t *
-uc_ubus_connect(uc_vm *vm, size_t nargs)
+uc_ubus_connect(uc_vm_t *vm, size_t nargs)
{
uc_value_t *socket = uc_get_arg(0);
uc_value_t *timeout = uc_get_arg(1);
@@ -199,7 +199,7 @@ uc_ubus_objects_cb(struct ubus_context *c, struct ubus_object_data *o, void *p)
}
static uc_value_t *
-uc_ubus_list(uc_vm *vm, size_t nargs)
+uc_ubus_list(uc_vm_t *vm, size_t nargs)
{
ubus_connection **c = uc_get_self("ubus.connection");
uc_value_t *objname = uc_get_arg(0);
@@ -237,7 +237,7 @@ uc_ubus_call_cb(struct ubus_request *req, int type, struct blob_attr *msg)
}
static uc_value_t *
-uc_ubus_call(uc_vm *vm, size_t nargs)
+uc_ubus_call(uc_vm_t *vm, size_t nargs)
{
ubus_connection **c = uc_get_self("ubus.connection");
uc_value_t *objname = uc_get_arg(0);
@@ -282,7 +282,7 @@ uc_ubus_call(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_ubus_disconnect(uc_vm *vm, size_t nargs)
+uc_ubus_disconnect(uc_vm_t *vm, size_t nargs)
{
ubus_connection **c = uc_get_self("ubus.connection");
@@ -296,12 +296,12 @@ uc_ubus_disconnect(uc_vm *vm, size_t nargs)
}
-static const uc_cfunction_list global_fns[] = {
+static const uc_cfunction_list_t global_fns[] = {
{ "error", uc_ubus_error },
{ "connect", uc_ubus_connect },
};
-static const uc_cfunction_list conn_fns[] = {
+static const uc_cfunction_list_t conn_fns[] = {
{ "list", uc_ubus_list },
{ "call", uc_ubus_call },
{ "error", uc_ubus_error },
@@ -320,7 +320,7 @@ static void close_connection(void *ud) {
free(conn);
}
-void uc_module_init(uc_vm *vm, uc_value_t *scope)
+void uc_module_init(uc_vm_t *vm, uc_value_t *scope)
{
uc_add_functions(scope, global_fns);