[cheese/wip/gtkapplication-refactor: 4/9] Mark cheese_[gtk_]init() arguments as allow-none



commit 55ac37e01a606b4c06044c505b90938b4ac908eb
Author: David King <amigadave amigadave com>
Date:   Sat Jun 29 16:24:45 2013 +0100

    Mark cheese_[gtk_]init() arguments as allow-none
    
    It is reasonable to pass NULL for argc and argv.

 libcheese/cheese-gtk.c      |    4 ++--
 libcheese/cheese.c          |    4 ++--
 src/vapi/cheese-common.vapi |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libcheese/cheese-gtk.c b/libcheese/cheese-gtk.c
index f6f7715..08cca76 100644
--- a/libcheese/cheese-gtk.c
+++ b/libcheese/cheese-gtk.c
@@ -38,8 +38,8 @@
 
 /**
  * cheese_gtk_init:
- * @argc: pointer to the argument list count
- * @argv: pointer to the argument list vector
+ * @argc: (allow-none): pointer to the argument list count
+ * @argv: (allow-none): pointer to the argument list vector
  *
  * Initialize libcheese-gtk, by initializing Clutter, GStreamer and GTK+. This
  * automatically calls cheese_init(), initializing libcheese.
diff --git a/libcheese/cheese.c b/libcheese/cheese.c
index 0393562..0e2e33e 100644
--- a/libcheese/cheese.c
+++ b/libcheese/cheese.c
@@ -33,8 +33,8 @@
 
 /**
  * cheese_init:
- * @argc: pointer to the argument list count
- * @argv: pointer to the argument list vector
+ * @argc: (allow-none): pointer to the argument list count
+ * @argv: (allow-none): pointer to the argument list vector
  *
  * Initialize libcheese, by initializing Clutter and GStreamer.
  *
diff --git a/src/vapi/cheese-common.vapi b/src/vapi/cheese-common.vapi
index 075b594..26e12a2 100644
--- a/src/vapi/cheese-common.vapi
+++ b/src/vapi/cheese-common.vapi
@@ -4,10 +4,10 @@
 namespace Cheese
 {
   [CCode (cheader_filename = "cheese.h")]
-  public static bool init([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
+  public static bool init([CCode (array_length_cname = "argc", array_length_pos = 0.5)] ref unowned 
string[]? argv);
 
   [CCode (cheader_filename = "cheese-gtk.h")]
-  public static bool gtk_init([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
+  public static bool gtk_init([CCode (array_length_cname = "argc", array_length_pos = 0.5)] ref unowned 
string[]? argv);
 
   [CCode (cheader_filename = "cheese-effect.h")]
   public class Effect : GLib.Object


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