[glibmm] gmmproc: Do not use NULL for optional parameters or properties.



commit 018b7fb5cecdd109985d63534b83d62faf2dc626
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Sun Jun 5 09:33:42 2011 -0400

    gmmproc: Do not use NULL for optional parameters or properties.
    
    	* tools/pm/Output.pm (convert_args_cpp_to_c):
    	(get_ctor_properties): Substitute 0 instead of NULL for optional
    	parameters or properties.

 ChangeLog          |    8 ++++++++
 tools/pm/Output.pm |    8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4937929..9a2d62f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-06-05  José Alburquerque  <jaalburqu svn gnome org>
+
+	gmmproc: Do not use NULL for optional parameters or properties.
+
+	* tools/pm/Output.pm (convert_args_cpp_to_c):
+	(get_ctor_properties): Substitute 0 instead of NULL for optional
+	parameters or properties.
+
 2011-06-04  Murray Cumming  <murrayc murrayc com>
 
 	Fix the build with --enable-warnings=fatal.
diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm
index 2fe6805..977d95a 100644
--- a/tools/pm/Output.pm
+++ b/tools/pm/Output.pm
@@ -835,7 +835,7 @@ sub convert_args_cpp_to_c($$$$$)
       # possibly added GError parameter).
       if ($$cpp_param_optional[$i])
       {
-        push(@result, "NULL");
+        push(@result, "0");
         next;
       }
     }
@@ -843,7 +843,7 @@ sub convert_args_cpp_to_c($$$$$)
     {
       # If this argument is not in the desired argument list (The argument
       # indices are stored in ascending order) then pass NULL to C func.
-      push(@result, "NULL");
+      push(@result, "0");
       next;
     }
     else
@@ -992,7 +992,7 @@ sub get_ctor_properties($$$$$)
     # possibly added GError parameter).
     if ($$cpp_param_optional[$i])
     {
-      push(@result, "NULL");
+      push(@result, "0");
       next;
     }
   }
@@ -1000,7 +1000,7 @@ sub get_ctor_properties($$$$$)
   {
     # If this argument is not in the desired argument list (The argument
     # indices are stored in ascending order) then pass NULL to C func.
-    push(@result, "NULL");
+    push(@result, "0");
     next;
   }
   else



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