[glibmm/glibmm-2-46] gmmproc: Fix a test in Output.pm::get_ctor_properties()



commit d3ef988f75df4b191f37f21cb68f1ce4b38c5b17
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Nov 22 18:46:46 2015 +0100

    gmmproc: Fix a test in Output.pm::get_ctor_properties()
    
    * tools/pm/Output.pm: A test whether a parameter is optional was messed up
    in such a way that it was always true. The test is just a precaution.
    In all normal cases the result of a correct test is also true. Probably
    the error has not affected the code generation from any correct .hg file.

 tools/pm/Output.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm
index 587d06b..daa55f3 100644
--- a/tools/pm/Output.pm
+++ b/tools/pm/Output.pm
@@ -1187,7 +1187,7 @@ sub convert_args_cpp_to_c($$$$$)
       # If the C++ index is not found in the list of desired parameters, pass
       # NULL to the C func unless the param is not optional (applies to a
       # possibly added GError parameter).
-      if (($$cpp_param_flags[$cpp_param_index] & FLAG_PARAM_OPTIONAL))
+      if ($$cpp_param_flags[$cpp_param_index] & FLAG_PARAM_OPTIONAL)
       {
         push(@conversions, "0");
         next;
@@ -1526,7 +1526,7 @@ sub get_ctor_properties($$$$$$)
     {
       # If the C++ index is not found in the list of desired parameters, pass
       # NULL to the C func unless the param is not optional.
-      if (~($$cpp_param_flags[$cpp_param_index] & FLAG_PARAM_OPTIONAL))
+      if ($$cpp_param_flags[$cpp_param_index] & FLAG_PARAM_OPTIONAL)
       {
         push(@result, "0");
         next;


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