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>
This commit is contained in:
Philip Withnall 2019-04-03 12:31:44 +01:00
parent 9976418262
commit c1c26448b1

View File

@ -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*