[glib: 1/2] Annotate `g_getenv()` and `g_environ_getenv()` return value as `nullable`




commit 07151049aaa8c3b22eeb96ef30c79814e13e0138
Author: Sebastian Dröge <sebastian centricular com>
Date:   Sat Nov 20 11:11:01 2021 +0200

    Annotate `g_getenv()` and `g_environ_getenv()` return value as `nullable`

 glib/genviron.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/genviron.c b/glib/genviron.c
index 44e10d4bd..485531ca2 100644
--- a/glib/genviron.c
+++ b/glib/genviron.c
@@ -88,7 +88,7 @@ g_environ_find (gchar       **envp,
  * Returns the value of the environment variable @variable in the
  * provided list @envp.
  *
- * Returns: (type filename): the value of the environment variable, or %NULL if
+ * Returns: (type filename) (nullable): the value of the environment variable, or %NULL if
  *     the environment variable is not set in @envp. The returned
  *     string is owned by @envp, and will be freed if @variable is
  *     set or unset again.
@@ -242,7 +242,7 @@ g_environ_unsetenv (gchar       **envp,
  * On Windows, in case the environment variable's value contains
  * references to other environment variables, they are expanded.
  *
- * Returns: (type filename): the value of the environment variable, or %NULL if
+ * Returns: (type filename) (nullable): the value of the environment variable, or %NULL if
  *     the environment variable is not found. The returned string
  *     may be overwritten by the next call to g_getenv(), g_setenv()
  *     or g_unsetenv().


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