[glib: 1/2] gutils: Add (nullable) annotation to g_get_prgname()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gutils: Add (nullable) annotation to g_get_prgname()
- Date: Wed, 3 Apr 2019 12:33:01 +0000 (UTC)
commit c1c26448b101f1257e886d273378e23005c82d57
Author: Philip Withnall <withnall endlessm com>
Date: Wed Apr 3 12:31:44 2019 +0100
gutils: Add (nullable) annotation to g_get_prgname()
It can return NULL if no program name has been set yet (i.e.
g_set_prgname() has not been called from somewhere).
Signed-off-by: Philip Withnall <withnall endlessm com>
glib/gutils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/glib/gutils.c b/glib/gutils.c
index 2e2d45785..b4ca1cc3f 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -1037,7 +1037,8 @@ static gchar *g_prgname = NULL;
* #GtkApplication::startup handler. The program name is found by
* taking the last component of @argv[0].
*
- * Returns: the name of the program. The returned string belongs
+ * Returns: (nullable): the name of the program, or %NULL if it has not been
+ * set yet. The returned string belongs
* to GLib and must not be modified or freed.
*/
const gchar*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]