[beast: 1/12] BSE: remove unused bse-categories-match-method procedure
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 1/12] BSE: remove unused bse-categories-match-method procedure
- Date: Thu, 24 Sep 2015 20:08:39 +0000 (UTC)
commit 2d3e90d529b3a49ad5c999fcb3a19e1477933b64
Author: Tim Janik <timj gnu org>
Date: Thu Sep 17 13:25:47 2015 +0200
BSE: remove unused bse-categories-match-method procedure
bse/bsecategories.proc | 50 ------------------------------------------------
1 files changed, 0 insertions(+), 50 deletions(-)
---
diff --git a/bse/bsecategories.proc b/bse/bsecategories.proc
index 5c0ebd9..a1a49da 100644
--- a/bse/bsecategories.proc
+++ b/bse/bsecategories.proc
@@ -91,53 +91,3 @@ BODY (BseProcedureClass *proc,
return Bse::ERROR_NONE;
}
-
-static gboolean
-categories_check_method (BseCategory *cat,
- gpointer data)
-{
- GType *type_p = (GType*) data;
- GType ptype = g_type_from_name (cat->type);
- gboolean match = FALSE;
- if (BSE_TYPE_IS_PROCEDURE (ptype))
- {
- BseProcedureClass *proc = (BseProcedureClass*) g_type_class_ref (ptype);
- if (proc->n_in_pspecs >= 1 &&
- g_type_is_a (G_PARAM_SPEC_VALUE_TYPE (proc->in_pspecs[0]), *type_p))
- match = TRUE;
- g_type_class_unref (proc);
- }
- return match;
-}
-
-PROCEDURE (bse-categories-match-method, "Categories/Match Method") {
- HELP = "List BSE categories according to a pattern, of type procedure and applying to a certain object
type.";
- IN = sfi_pspec_string ("pattern", "Pattern", "Pattern to match category, supports '*' and '?'
wildcards.",
- "*", SFI_PARAM_STANDARD);
- IN = sfi_pspec_string ("type", "Type", "Object base type for methods to conform to.",
- NULL, SFI_PARAM_STANDARD);
- OUT = bse_param_spec_boxed ("categories", "Categories", NULL, BSE_TYPE_CATEGORY_SEQ, SFI_PARAM_STANDARD);
-}
-BODY (BseProcedureClass *proc,
- const GValue *in_values,
- GValue *out_values)
-{
- /* extract parameter values */
- const char *pattern = sfi_value_get_string (in_values++);
- const char *type_name = sfi_value_get_string (in_values++);
- GType type = type_name ? g_type_from_name (type_name) : 0;
- BseCategorySeq *cseq = NULL;
-
- /* check parameters */
- if (!pattern)
- return Bse::ERROR_PROC_PARAM_INVAL;
-
- cseq = bse_categories_match (pattern, BSE_TYPE_PROCEDURE, categories_check_method, &type);
- if (!cseq)
- cseq = bse_category_seq_new ();
-
- /* set output parameters */
- bse_value_take_boxed (out_values++, cseq);
-
- return Bse::ERROR_NONE;
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]