[beast: 1/10] BSE: rename 'Category.otype', since 'type' is a reserved word in Python



commit ed9c641bad9aa303b9eac43e899707074dfcd49e
Author: Tim Janik <timj gnu org>
Date:   Mon Jan 18 01:14:33 2016 +0100

    BSE: rename 'Category.otype', since 'type' is a reserved word in Python
    
    Signed-off-by: Tim Janik <timj gnu org>

 beast-gtk/bstapp.cc        |    2 +-
 beast-gtk/bstpartdialog.cc |    2 +-
 beast-gtk/bstsnetrouter.cc |    2 +-
 bse/bsebasics.idl          |    2 +-
 bse/bsecategories.cc       |    4 ++--
 bse/bseglue.cc             |    6 +++---
 bse/bseprocidl.cc          |    4 ++--
 bse/bsetool.cc             |    2 +-
 8 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/beast-gtk/bstapp.cc b/beast-gtk/bstapp.cc
index d20be36..14825f6 100644
--- a/beast-gtk/bstapp.cc
+++ b/beast-gtk/bstapp.cc
@@ -806,7 +806,7 @@ bst_app_run_script_proc (gpointer data, size_t action_id)
         csynth = "custom-synth";
     }
 
-  bst_procedure_exec_auto (cat->type,
+  bst_procedure_exec_auto (cat->otype,
                            "project", SFI_TYPE_PROXY, self->project.proxy_id(),
                            song, SFI_TYPE_PROXY, super,
                            wave_repo, SFI_TYPE_PROXY, super,
diff --git a/beast-gtk/bstpartdialog.cc b/beast-gtk/bstpartdialog.cc
index 0ac14d2..86b6c88 100644
--- a/beast-gtk/bstpartdialog.cc
+++ b/beast-gtk/bstpartdialog.cc
@@ -327,7 +327,7 @@ part_dialog_run_script_proc (gpointer data, size_t action_id)
   BseCategory *cat = bse_category_find (g_quark_to_string (action_id));
   Bse::PartH part = self->proll->part;
 
-  bst_procedure_exec_auto (cat->type,
+  bst_procedure_exec_auto (cat->otype,
                            "project", SFI_TYPE_PROXY, bse_item_get_project (part.proxy_id()),
                            "part", SFI_TYPE_PROXY, part.proxy_id(),
                            NULL);
diff --git a/beast-gtk/bstsnetrouter.cc b/beast-gtk/bstsnetrouter.cc
index 3a3c1d1..fed7b48 100644
--- a/beast-gtk/bstsnetrouter.cc
+++ b/beast-gtk/bstsnetrouter.cc
@@ -321,7 +321,7 @@ bst_router_run_method (gpointer user_data, size_t action_id)
 {
   BstSNetRouter *self = BST_SNET_ROUTER (user_data);
   BseCategory *cat = bse_category_find (g_quark_to_string (action_id));
-  bst_procedure_exec_auto (cat->type,
+  bst_procedure_exec_auto (cat->otype,
                            "synth-net", SFI_TYPE_PROXY, self->snet.proxy_id(),
                            BSE_IS_CSYNTH (self->snet.proxy_id()) ? "custom-synth" : "", SFI_TYPE_PROXY, 
self->snet.proxy_id(),
                            NULL);
diff --git a/bse/bsebasics.idl b/bse/bsebasics.idl
index edbee5c..fa5c35f 100644
--- a/bse/bsebasics.idl
+++ b/bse/bsebasics.idl
@@ -275,7 +275,7 @@ record Category
   SfiString category;
   Int    mindex;
   Int    lindex;
-  SfiString type;
+  SfiString otype;
   Ic0n   icon;
 };
 sequence CategorySeq {
diff --git a/bse/bsecategories.cc b/bse/bsecategories.cc
index 8fbdee6..3472dc9 100644
--- a/bse/bsecategories.cc
+++ b/bse/bsecategories.cc
@@ -284,7 +284,7 @@ categories_match (const gchar      *pattern,
          cat.category_id = centry->category_id;
          cat.mindex = centry->mindex;
          cat.lindex = centry->lindex;
-         cat.type = const_cast<char*>  (g_type_name (centry->type));
+         cat.otype = const_cast<char*>  (g_type_name (centry->type));
          cat.icon = centry->icon ? centry->icon : NULL;
           if (!check || check (&cat, data))
             bse_category_seq_append (cseq, &cat);
@@ -333,7 +333,7 @@ bse_categories_from_type (GType type)
        cat.category_id = centry->category_id;
        cat.mindex = centry->mindex;
        cat.lindex = centry->lindex;
-       cat.type = const_cast<char*> (g_type_name (centry->type));
+       cat.otype = const_cast<char*> (g_type_name (centry->type));
        cat.icon = centry->icon ? centry->icon : NULL;
        bse_category_seq_append (cseq, &cat);
       }
diff --git a/bse/bseglue.cc b/bse/bseglue.cc
index 6c96854..0fe6753 100644
--- a/bse/bseglue.cc
+++ b/bse/bseglue.cc
@@ -532,7 +532,7 @@ bglue_list_proc_names (SfiGlueContext *context)
 
   p = g_new (char*, cseq->n_cats + 1);
   for (i = 0; i < cseq->n_cats; i++)
-    p[i] = g_strdup (cseq->cats[i]->type);
+    p[i] = g_strdup (cseq->cats[i]->otype);
   p[i] = NULL;
   bse_category_seq_free (cseq);
 
@@ -558,8 +558,8 @@ bglue_list_method_names (SfiGlueContext *context,
   p = g_new (char*, cseq->n_cats + 1);
   n_procs = 0;
   for (i = 0; i < cseq->n_cats; i++)
-    if (strncmp (cseq->cats[i]->type, prefix, l) == 0)
-      p[n_procs++] = g_strdup (cseq->cats[i]->type + l);
+    if (strncmp (cseq->cats[i]->otype, prefix, l) == 0)
+      p[n_procs++] = g_strdup (cseq->cats[i]->otype + l);
   p[n_procs] = NULL;
   bse_category_seq_free (cseq);
   g_free (prefix);
diff --git a/bse/bseprocidl.cc b/bse/bseprocidl.cc
index d2ce551..fde823d 100644
--- a/bse/bseprocidl.cc
+++ b/bse/bseprocidl.cc
@@ -222,12 +222,12 @@ void printMethods (const std::string& iface)
   cseq = bse_categories_match_typed ("*", BSE_TYPE_PROCEDURE);
   for (i = 0; i < cseq->n_cats; i++)
     {
-      GType type_id = g_type_from_name (cseq->cats[i]->type);
+      GType type_id = g_type_from_name (cseq->cats[i]->otype);
       const gchar *blurb = bse_type_get_blurb (type_id);
       BseProcedureClass *klass = (BseProcedureClass *)g_type_class_ref (type_id);
 
       /* procedures */
-      std::string t = cseq->cats[i]->type;
+      std::string t = cseq->cats[i]->otype;
       std::string iname = getInterface (t);
       std::string mname = getMethod (t);
       std::string rtype = klass->n_out_pspecs ?
diff --git a/bse/bsetool.cc b/bse/bsetool.cc
index b979746..ab5fa93 100644
--- a/bse/bsetool.cc
+++ b/bse/bsetool.cc
@@ -257,7 +257,7 @@ dump_categories (const ArgParser &ap)
 {
   BseCategorySeq *cseq = bse_categories_match_typed ("*", 0);
   for (uint i = 0; i < cseq->n_cats; i++)
-    printout ("%s\t(%s)\n", cseq->cats[i]->category, cseq->cats[i]->type);
+    printout ("%s\t(%s)\n", cseq->cats[i]->category, cseq->cats[i]->otype);
   bse_category_seq_free (cseq);
   return "";
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]