From 0e5e8e583df956dff9c6229403e4362e1b17ed43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Alburquerque?= Date: Tue, 11 Oct 2011 16:22:43 -0400 Subject: 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 68dd5739..bfa58054 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-10-11 José Alburquerque + + 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 ApplicationCommandLine: Add the get_platform_data() method. diff --git a/tools/m4/convert_base.m4 b/tools/m4/convert_base.m4 index 06963c19..eb07c1ef 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 c3d4a58f..4ec437d9 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; -- cgit v1.2.1