[beast: 5/10] SFI: throw away unused procedure execution code
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 5/10] SFI: throw away unused procedure execution code
- Date: Mon, 9 Oct 2017 23:45:45 +0000 (UTC)
commit 915df47c1f897dfeb338cd703371e56ebfde9581
Author: Tim Janik <timj gnu org>
Date: Sun Oct 8 00:52:24 2017 +0200
SFI: throw away unused procedure execution code
Signed-off-by: Tim Janik <timj gnu org>
sfi/sfiglue.cc | 57 ---------------------------------------------------
sfi/sfiglue.hh | 9 +-------
sfi/sfigluecodec.cc | 37 +--------------------------------
sfi/sfigluecodec.hh | 2 +-
4 files changed, 3 insertions(+), 102 deletions(-)
---
diff --git a/sfi/sfiglue.cc b/sfi/sfiglue.cc
index 2cc4ae1..37c60ce 100644
--- a/sfi/sfiglue.cc
+++ b/sfi/sfiglue.cc
@@ -275,63 +275,6 @@ sfi_glue_client_msg (const gchar *msg,
return rvalue;
}
-
-/* --- procedure calls --- */
-GValue*
-sfi_glue_call_seq (const gchar *proc_name,
- SfiSeq *params)
-{
- SfiGlueContext *context = sfi_glue_fetch_context (G_STRLOC);
-
- assert_return (proc_name != NULL, NULL);
- assert_return (params != NULL, NULL);
-
- GValue *value = context->table.exec_proc (context, proc_name, params);
- if (value)
- sfi_glue_gc_add (value, SfiGlueGcFreeFunc (sfi_value_free));
- return value;
-}
-
-GValue*
-sfi_glue_call_valist (const gchar *proc_name,
- guint8 first_arg_type,
- va_list var_args)
-{
- guint8 arg_type = first_arg_type;
- SfiSeq *seq;
-
- assert_return (proc_name != NULL, NULL);
-
- seq = sfi_seq_new ();
- while (arg_type)
- {
- gchar *error = NULL;
- GType collect_type = sfi_category_type (SfiSCategory (arg_type));
- if (!collect_type)
- error = g_strdup_format ("%s: invalid category_type (%u)", G_STRLOC, arg_type);
- else
- {
- GValue *value = sfi_seq_append_empty (seq, collect_type);
- G_VALUE_COLLECT (value, var_args, 0, &error);
- }
- if (error)
- {
- Bse::info ("%s: %s", G_STRLOC, error);
- g_free (error);
- sfi_seq_unref (seq);
- return NULL;
- }
- arg_type = va_arg (var_args, guint);
- }
- if (seq)
- {
- GValue *retval = sfi_glue_call_seq (proc_name, seq);
- sfi_seq_unref (seq);
- return retval; /* already GC owned */
- }
- return NULL;
-}
-
/* --- Glue utilities --- */
SfiGlueIFace*
sfi_glue_iface_new (const gchar *iface_name)
diff --git a/sfi/sfiglue.hh b/sfi/sfiglue.hh
index c1e5e9c..f5a9dfc 100644
--- a/sfi/sfiglue.hh
+++ b/sfi/sfiglue.hh
@@ -45,11 +45,6 @@ void sfi_glue_proc_unref (SfiGlueProc *proc);
const gchar** sfi_glue_list_proc_names (void);
const gchar** sfi_glue_list_method_names (const gchar *iface_name);
-GValue* sfi_glue_call_seq (const gchar *proc_name,
- SfiSeq *params);
-GValue* sfi_glue_call_valist (const gchar *proc_name,
- guint8 first_arg_type,
- va_list var_args);
GValue* sfi_glue_client_msg (const gchar *msg,
GValue *value);
@@ -68,9 +63,7 @@ typedef struct {
gchar* (*base_iface) (SfiGlueContext *context);
gchar** (*iface_children) (SfiGlueContext *context,
const gchar *iface_name);
- GValue* (*exec_proc) (SfiGlueContext *context,
- const gchar *proc_name,
- SfiSeq *params);
+ void *exec_proc; // unused
/* proxy functions */
gchar* (*proxy_iface) (SfiGlueContext *context,
SfiProxy proxy);
diff --git a/sfi/sfigluecodec.cc b/sfi/sfigluecodec.cc
index 3a6892c..4ee1950 100644
--- a/sfi/sfigluecodec.cc
+++ b/sfi/sfigluecodec.cc
@@ -16,9 +16,6 @@ static gchar** encoder_list_method_names (SfiGlueContext *context,
static gchar* encoder_base_iface (SfiGlueContext *context);
static gchar** encoder_iface_children (SfiGlueContext *context,
const gchar *iface_name);
-static GValue* encoder_exec_proc (SfiGlueContext *context,
- const gchar *proc_name,
- SfiSeq *params);
static gchar* encoder_proxy_iface (SfiGlueContext *context,
SfiProxy proxy);
static gboolean encoder_proxy_is_a (SfiGlueContext *context,
@@ -68,7 +65,7 @@ sfi_glue_encoder_context (SfiComPort *port)
encoder_list_method_names,
encoder_base_iface,
encoder_iface_children,
- encoder_exec_proc,
+ NULL /*exec_proc*/,
encoder_proxy_iface,
encoder_proxy_is_a,
encoder_proxy_list_properties,
@@ -420,36 +417,6 @@ decoder_iface_children (SfiGlueDecoder *decoder,
return rvalue;
}
-static GValue*
-encoder_exec_proc (SfiGlueContext *context,
- const gchar *proc_name,
- SfiSeq *params)
-{
- GValue *rvalue = NULL;
- SfiSeq *seq = sfi_seq_new ();
- sfi_seq_append_int (seq, SFI_GLUE_CODEC_EXEC_PROC);
- sfi_seq_append_string (seq, proc_name);
- sfi_seq_append_seq (seq, params);
-
- seq = encoder_exec_round_trip (context, seq);
-
- if (seq->n_elements)
- rvalue = sfi_value_clone_shallow (sfi_seq_get (seq, 0));
- sfi_seq_unref (seq);
- return rvalue;
-}
-
-static GValue*
-decoder_exec_proc (SfiGlueDecoder *decoder,
- SfiSeq *seq)
-{
- GValue *pvalue = sfi_glue_call_seq (sfi_seq_get_string (seq, 1),
- sfi_seq_get_seq (seq, 2));
- if (pvalue)
- sfi_glue_gc_remove (pvalue, SfiGlueGcFreeFunc (sfi_value_free));
- return pvalue;
-}
-
static gchar*
encoder_proxy_iface (SfiGlueContext *context,
SfiProxy proxy)
@@ -850,8 +817,6 @@ decoder_process_request (SfiGlueDecoder *decoder,
return decoder_base_iface (decoder, seq);
case SFI_GLUE_CODEC_IFACE_CHILDREN:
return decoder_iface_children (decoder, seq);
- case SFI_GLUE_CODEC_EXEC_PROC:
- return decoder_exec_proc (decoder, seq);
case SFI_GLUE_CODEC_PROXY_IFACE:
return decoder_proxy_iface (decoder, seq);
case SFI_GLUE_CODEC_PROXY_IS_A:
diff --git a/sfi/sfigluecodec.hh b/sfi/sfigluecodec.hh
index 81656f6..f4a2c85 100644
--- a/sfi/sfigluecodec.hh
+++ b/sfi/sfigluecodec.hh
@@ -62,7 +62,7 @@ typedef enum /*< skip >*/
SFI_GLUE_CODEC_LIST_METHOD_NAMES,
SFI_GLUE_CODEC_BASE_IFACE,
SFI_GLUE_CODEC_IFACE_CHILDREN,
- SFI_GLUE_CODEC_EXEC_PROC,
+ SFI_GLUE_CODEC_UNUSED_1,
SFI_GLUE_CODEC_PROXY_IFACE,
SFI_GLUE_CODEC_PROXY_IS_A,
SFI_GLUE_CODEC_PROXY_LIST_PROPERTIES,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]