summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2021-12-30 13:38:39 +0100
committerJens Georg <mail@jensge.org>2021-12-30 16:59:13 +0100
commit6b13ea26ae0330adbc7b7c67733f27a4b44de820 (patch)
tree8a63c6d6e37eeacbd38ebb908943e08b5dff0a9c
parent0562d38cd72b7700d43ccea049e0a259faa5c3ed (diff)
downloadgupnp-6b13ea26ae0330adbc7b7c67733f27a4b44de820.tar.gz
Service: Remove _valist functions
-rw-r--r--libgupnp/gupnp-service-action.c43
-rw-r--r--libgupnp/gupnp-service.c18
-rw-r--r--libgupnp/gupnp-service.h12
3 files changed, 6 insertions, 67 deletions
diff --git a/libgupnp/gupnp-service-action.c b/libgupnp/gupnp-service-action.c
index 6e7c178..ddd7091 100644
--- a/libgupnp/gupnp-service-action.c
+++ b/libgupnp/gupnp-service-action.c
@@ -179,27 +179,9 @@ gupnp_service_action_get (GUPnPServiceAction *action, ...)
g_return_if_fail (action != NULL);
va_start (var_args, action);
- gupnp_service_action_get_valist (action, var_args);
- va_end (var_args);
-}
-
-/**
- * gupnp_service_action_get_valist:
- * @action: A #GUPnPServiceAction
- * @var_args: va_list of tuples of argument name, argument type, and argument
- * value location.
- *
- * See gupnp_service_action_get(); this version takes a va_list for
- * use by language bindings.
- **/
-void
-gupnp_service_action_get_valist (GUPnPServiceAction *action, va_list var_args)
-{
const char *arg_name;
GType arg_type;
- GValue value = {
- 0,
- };
+ GValue value = G_VALUE_INIT;
char *copy_error;
g_return_if_fail (action != NULL);
@@ -225,8 +207,10 @@ gupnp_service_action_get_valist (GUPnPServiceAction *action, va_list var_args)
arg_name = va_arg (var_args, const char *);
}
+ va_end (var_args);
}
+
/**
* gupnp_service_action_get_values:
* @action: A #GUPnPServiceAction
@@ -371,27 +355,9 @@ gupnp_service_action_set (GUPnPServiceAction *action, ...)
g_return_if_fail (action != NULL);
va_start (var_args, action);
- gupnp_service_action_set_valist (action, var_args);
- va_end (var_args);
-}
-
-/**
- * gupnp_service_action_set_valist:
- * @action: A #GUPnPServiceAction
- * @var_args: va_list of tuples of return value name, return value type, and
- * actual return value.
- *
- * See gupnp_service_action_set(); this version takes a va_list for
- * use by language bindings.
- **/
-void
-gupnp_service_action_set_valist (GUPnPServiceAction *action, va_list var_args)
-{
const char *arg_name;
GType arg_type;
- GValue value = {
- 0,
- };
+ GValue value = G_VALUE_INIT;
char *collect_error;
g_return_if_fail (action != NULL);
@@ -423,6 +389,7 @@ gupnp_service_action_set_valist (GUPnPServiceAction *action, va_list var_args)
arg_name = va_arg (var_args, const char *);
}
+ va_end (var_args);
}
/**
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index 0f2f876..212b972 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -1321,23 +1321,6 @@ gupnp_service_notify (GUPnPService *service,
g_return_if_fail (GUPNP_IS_SERVICE (service));
va_start (var_args, service);
- gupnp_service_notify_valist (service, var_args);
- va_end (var_args);
-}
-
-/**
- * gupnp_service_notify_valist:
- * @service: A #GUPnPService
- * @var_args: A va_list of tuples of variable name, variable type, and variable
- * value, terminated with %NULL.
- *
- * See gupnp_service_notify(); this version takes a va_list for
- * use by language bindings.
- **/
-void
-gupnp_service_notify_valist (GUPnPService *service,
- va_list var_args)
-{
const char *var_name;
GType var_type;
GValue value = {0, };
@@ -1368,6 +1351,7 @@ gupnp_service_notify_valist (GUPnPService *service,
var_name = va_arg (var_args, const char *);
}
+ va_end (var_args);
}
diff --git a/libgupnp/gupnp-service.h b/libgupnp/gupnp-service.h
index dc0d808..088bf47 100644
--- a/libgupnp/gupnp-service.h
+++ b/libgupnp/gupnp-service.h
@@ -69,10 +69,6 @@ void
gupnp_service_action_get (GUPnPServiceAction *action,
...) G_GNUC_NULL_TERMINATED;
-void
-gupnp_service_action_get_valist (GUPnPServiceAction *action,
- va_list var_args);
-
GList *
gupnp_service_action_get_values (GUPnPServiceAction *action,
GList *arg_names,
@@ -93,10 +89,6 @@ gupnp_service_action_set (GUPnPServiceAction *action,
...) G_GNUC_NULL_TERMINATED;
void
-gupnp_service_action_set_valist (GUPnPServiceAction *action,
- va_list var_args);
-
-void
gupnp_service_action_set_values (GUPnPServiceAction *action,
GList *arg_names,
GList *arg_values);
@@ -126,10 +118,6 @@ gupnp_service_notify (GUPnPService *service,
...) G_GNUC_NULL_TERMINATED;
void
-gupnp_service_notify_valist (GUPnPService *service,
- va_list var_args);
-
-void
gupnp_service_notify_value (GUPnPService *service,
const char *variable,
const GValue *value);