[glib/glib-2-28] GApplication: Clarify docs for @argv



commit f21b28c3f1f44ec96a215537790ee4490c320f05
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 4 00:12:34 2011 -0500

    GApplication: Clarify docs for @argv
    
    Clearly state that @argv may be NULL.
    https://bugzilla.gnome.org/show_bug.cgi?id=643649

 gio/gapplication.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index f10d2d8..a726e5f 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -1155,14 +1155,17 @@ g_application_open (GApplication  *application,
 /**
  * g_application_run:
  * @application: a #GApplication
- * @argc: the argc from main()
- * @argv: (array length=argc): the argv from main()
+ * @argc: the argc from main() (or 0 if @argv is %NULL)
+ * @argv: (array length=argc): the argv from main(), or %NULL
  * @returns: the exit status
  *
  * Runs the application.
  *
  * This function is intended to be run from main() and its return value
- * is intended to be returned by main().
+ * is intended to be returned by main(). Although you are expected to pass
+ * the @argc, @argv parameters from main() to this function, it is possible
+ * to pass %NULL if @argv is not available or commandline handling is not
+ * required.
  *
  * First, the local_command_line() virtual function is invoked.
  * This function always runs on the local instance. It gets passed



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