[beast: 4/10] BSE: throw away unused procedure execution code
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 4/10] BSE: throw away unused procedure execution code
- Date: Mon, 9 Oct 2017 23:45:40 +0000 (UTC)
commit 742d803201117fe9bdf504ab1c7cd064c5f62c72
Author: Tim Janik <timj gnu org>
Date: Sun Oct 8 00:52:10 2017 +0200
BSE: throw away unused procedure execution code
Signed-off-by: Tim Janik <timj gnu org>
bse/bseglue.cc | 80 +-------------------------------------------------------
1 files changed, 1 insertions(+), 79 deletions(-)
---
diff --git a/bse/bseglue.cc b/bse/bseglue.cc
index 0e160a1..98dd864 100644
--- a/bse/bseglue.cc
+++ b/bse/bseglue.cc
@@ -52,9 +52,6 @@ static char** bglue_list_method_names (SfiGlueContext *context
static char* bglue_base_iface (SfiGlueContext *context);
static char** bglue_iface_children (SfiGlueContext *context,
const char *iface_name);
-static GValue* bglue_exec_proc (SfiGlueContext *context,
- const char *proc_name,
- SfiSeq *params);
static char* bglue_proxy_iface (SfiGlueContext *context,
SfiProxy proxy);
static gboolean bglue_proxy_is_a (SfiGlueContext *context,
@@ -152,7 +149,7 @@ bse_glue_context_intern (const char *user)
bglue_list_method_names,
bglue_base_iface,
bglue_iface_children,
- bglue_exec_proc,
+ NULL /*exec_proc*/,
bglue_proxy_iface,
bglue_proxy_is_a,
bglue_proxy_list_properties,
@@ -634,81 +631,6 @@ bglue_iface_children (SfiGlueContext *context,
return childnames;
}
-static Bse::Error
-bglue_marshal_proc (void *marshal_data,
- BseProcedureClass *proc,
- const GValue *ivalues,
- GValue *ovalues)
-{
- return proc->execute (proc, ivalues, ovalues);
-}
-
-static GValue*
-bglue_exec_proc (SfiGlueContext *context,
- const char *proc_name,
- SfiSeq *params)
-{
- GValue *retval = NULL;
- GType ptype = bse_procedure_lookup (proc_name);
-
- if (BSE_TYPE_IS_PROCEDURE (ptype) && G_TYPE_IS_DERIVED (ptype))
- {
- BseProcedureClass *proc = (BseProcedureClass*) g_type_class_ref (ptype);
- GValue *ovalues = g_new0 (GValue, proc->n_out_pspecs);
- GSList *ilist = NULL, *olist = NULL, *clearlist = NULL;
- uint i, sl = sfi_seq_length (params);
- Bse::Error error;
-
- for (i = 0; i < proc->n_in_pspecs; i++)
- {
- GParamSpec *pspec = proc->in_pspecs[i];
- if (i < sl)
- {
- GValue *sfivalue = sfi_seq_get (params, i);
- GValue *bsevalue = bglue_value_from_serializable (sfivalue, pspec);
- ilist = g_slist_prepend (ilist, bsevalue ? bsevalue : sfivalue);
- if (bsevalue)
- clearlist = g_slist_prepend (clearlist, bsevalue);
- }
- else
- {
- GValue *value = sfi_value_empty ();
- g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec));
- g_param_value_set_default (pspec, value);
- ilist = g_slist_prepend (ilist, value);
- clearlist = g_slist_prepend (clearlist, value);
- }
- }
- for (i = 0; i < proc->n_out_pspecs; i++)
- {
- g_value_init (ovalues + i, G_PARAM_SPEC_VALUE_TYPE (proc->out_pspecs[i]));
- olist = g_slist_prepend (olist, ovalues + i);
- }
-
- ilist = g_slist_reverse (ilist);
- olist = g_slist_reverse (olist);
- error = bse_procedure_execvl (proc, ilist, olist, bglue_marshal_proc, NULL);
- g_slist_free (ilist);
- g_slist_free (olist);
- for (ilist = clearlist; ilist; ilist = ilist->next)
- sfi_value_free ((GValue*) ilist->data);
- g_slist_free (clearlist);
-
- if (error != 0)
- Bse::warning ("while executing \"%s\": %s", BSE_PROCEDURE_NAME (proc), bse_error_blurb (error));
- if (proc->n_out_pspecs)
- retval = bglue_value_to_serializable (ovalues + 0);
- for (i = 0; i < proc->n_out_pspecs; i++)
- g_value_unset (ovalues + i);
- g_free (ovalues);
- g_type_class_unref (proc);
- }
- else
- Bse::info ("failed to execute \"%s\": no such procedure", proc_name);
-
- return retval;
-}
-
static char*
bglue_proxy_iface (SfiGlueContext *context,
SfiProxy proxy)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]