[glibmm] gmmproc: _WRAP_METHOD: Use {OUT} instead of {RET} for output params.



commit 0e5e8e583df956dff9c6229403e4362e1b17ed43
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date:   Tue Oct 11 16:22:43 2011 -0400

    gmmproc: _WRAP_METHOD: Use {OUT} instead of {RET} for output params.
    
    	* tools/pm/Output.pm: Use {OUT} instead of {RET} to signify that a
    	parameter is an output parameter because it is probably more
    	intuitive.
    	* tools/m4/convert_base.m4 (_INITIALIZE): Don't quote the C return
    	because otherwise the macros in it aren't expanded when the macro is
    	used.  This could be because of the recent M4 changes in the previous
    	to the last commit.

 ChangeLog                |   12 ++++++++++++
 tools/m4/convert_base.m4 |    2 +-
 tools/pm/Output.pm       |   10 +++++-----
 3 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 68dd573..bfa5805 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2011-10-11  Josà Alburquerque  <jaalburqu svn gnome org>
 
+	gmmproc: _WRAP_METHOD: Use {OUT} instead of {RET} for output params.
+
+	* tools/pm/Output.pm: Use {OUT} instead of {RET} to signify that a
+	parameter is an output parameter because it is probably more
+	intuitive.
+	* tools/m4/convert_base.m4 (_INITIALIZE): Don't quote the C return
+	because otherwise the macros in it aren't expanded when the macro is
+	used.  This could be because of the recent M4 changes in the previous
+	to the last commit.
+
+2011-10-11  Josà Alburquerque  <jaalburqu svn gnome org>
+
 	ApplicationCommandLine: Add the get_platform_data() method.
 
 	* gio/src/applicationcommandline.hg:
diff --git a/tools/m4/convert_base.m4 b/tools/m4/convert_base.m4
index 06963c1..eb07c1e 100644
--- a/tools/m4/convert_base.m4
+++ b/tools/m4/convert_base.m4
@@ -41,7 +41,7 @@ m4_ifelse(`$3',,,`define(CF`'__HASH2(`$1',`$2'),`$3')')
 define(`_INITIALIZE',`dnl
 m4_ifelse(`$1',void,`$4',`dnl
 pushdef(`__INI',`IN`'__HASH2(`$1',`$2')')dnl
-m4_ifdef(__INI,`m4_indir(__INI,m4_substr(`$1',`0',m4_decr(m4_len(`$1'))),`$2',`$3', `$4')',`
+m4_ifdef(__INI,`m4_indir(__INI,m4_substr(`$1',`0',m4_decr(m4_len(`$1'))),`$2',`$3', $4)',`
 m4_errprint(`No initialization for type $1 from type $2 defined (line: $5, output param: $3, c return: $4)
 ')
 m4_m4exit(1)
diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm
index c3d4a58..4ec437d 100644
--- a/tools/pm/Output.pm
+++ b/tools/pm/Output.pm
@@ -291,10 +291,10 @@ sub output_wrap_meth($$$$$$$)
   my $output_var_name;
   my $output_var_type;
 
-  if(defined($$cpp_param_mappings{"RET"}))
+  if(defined($$cpp_param_mappings{"OUT"}))
   {
-    $output_var_name = $$cpp_param_names[$$cpp_param_mappings{"RET"}];
-    $output_var_type = $$cpp_param_types[$$cpp_param_mappings{"RET"}];
+    $output_var_name = $$cpp_param_names[$$cpp_param_mappings{"OUT"}];
+    $output_var_type = $$cpp_param_types[$$cpp_param_mappings{"OUT"}];
   }
 
   for(my $arg_list = 0; $arg_list < $num_args_list; $arg_list++)
@@ -811,11 +811,11 @@ sub convert_args_cpp_to_c($$$$$)
   # See if there is an output parameter.  If so, temporarily decrement the
   # number of C++ arguments so that the possible GError addition works and
   # note the existence.
-  if(defined($$cpp_param_mappings{"RET"}))
+  if(defined($$cpp_param_mappings{"OUT"}))
   {
     $num_cpp_args--;
     $has_output_param = 1;
-    $output_param_index = $$cpp_param_mappings{"RET"};
+    $output_param_index = $$cpp_param_mappings{"OUT"};
   }
 
   # add implicit last error parameter;



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