[gstreamermm: 118/167] fixed plugin hg generator - different access operator for arrays/lists and other values



commit 68788d8430e1dd30ee06e296a5d8c346e159dd67
Author: Marcin Kolny [loganek] <marcin kolny gmail com>
Date:   Fri Aug 2 02:19:35 2013 +0200

    fixed plugin hg generator - different access operator for arrays/lists and other values

 .../extra_defs_gen/generate_plugin_gmmproc_file.cc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc 
b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index 7e00f80..8319565 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -381,8 +381,10 @@ static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
         if(g_type_is_a(returnGType, G_TYPE_BOXED))
         {
           // Unwrapping conversion:
+          std::string access_operator = (returnGType != G_TYPE_VALUE_ARRAY && returnGType != 
GST_TYPE_TAG_LIST) ? "->" : ".";
+          // For GValueArray and TagList, RefPtr is not generated, and we need to use '.' operator.
           convertMacros += "#m4 _CONVERSION(_LQ()" + returnCTypeTranslation +
-            "_RQ(), ``" + returnCType + "'', ``($3).gobj_copy()'')\n";
+            "_RQ(), ``" + returnCType + "'', ``($3)" + access_operator + "gobj_copy()'')\n";
 
           // Also include a wrapping conversion:
 


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