[glibmm] Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly.



commit fe5dfc0861d86e2701620815fc0a6a56602a5d80
Author: José Alburquerque <jaalburquerque gmail com>
Date:   Sun Apr 28 17:00:17 2013 -0400

    Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly.
    
        * tools/pm/Output.pm (convert_args_c_to_cpp): Reverse the hash that
        maps from parameter names to indexes to a hash that maps from
        indexes to parameter names correctly (by dereferencing the hash
        reference) so that parameter reordering for virtual functions works
        for all Perl versions.
    
        Bug #698989 (David Evans, John Ralls)

 ChangeLog          |   12 ++++++++++++
 tools/pm/Output.pm |    6 ++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 444a428..176a0aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-04-29  José Alburquerque  <jaalburquerque gmail com>
+
+       Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly.
+
+       * tools/pm/Output.pm (convert_args_c_to_cpp): Reverse the hash that
+       maps from parameter names to indexes to a hash that maps from
+       indexes to parameter names correctly (by dereferencing the hash
+       reference) so that parameter reordering for virtual functions works
+       for all Perl versions.
+
+       Bug #698989 (David Evans, John Ralls)
+
 2013-04-29  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
        gmmproc: Fix _WRAP_SIGNAL(custom_c_callback) for void func().
diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm
index 337c274..dc69675 100644
--- a/tools/pm/Output.pm
+++ b/tools/pm/Output.pm
@@ -1168,8 +1168,10 @@ sub convert_args_c_to_cpp($$$)
   # index to the C param name if the mappings exist.
   my %cpp_index_param_mappings;
 
-  @cpp_index_param_mappings{values $$objCppfunc{param_mappings}}
-    = keys $$objCppfunc{param_mappings};
+  # Fill the index to param names mappings from the c param names to index
+  # mappings variable above.
+  @cpp_index_param_mappings{values %{$$objCppfunc{param_mappings}}}
+    = keys %{$$objCppfunc{param_mappings}};
 
   my @result;
 


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