From 9330cf48438818aad951c43f7b23ff27ad7d8c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Thu, 9 Feb 2023 15:25:42 +0100 Subject: docs: Be more specific on error out cases Add a disambiguation of what to return and do with the out values in case an error is thrown. --- docs/website/annotations/giannotations.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/website/annotations/giannotations.rst b/docs/website/annotations/giannotations.rst index 696f5b06..8769132a 100644 --- a/docs/website/annotations/giannotations.rst +++ b/docs/website/annotations/giannotations.rst @@ -223,7 +223,7 @@ Type signature * - ``(nullable)`` - parameters, return value - Indicates that ``NULL`` may be a valid value for a parameter - (in, out, inout), or return value (though note that return values which + (in, out, inout), or return value (though note that return and out values which are only ``NULL`` when throwing an error should not be annotated as ``(nullable)``). - :commit:`1.42 <1459ff3e>` @@ -681,6 +681,8 @@ parameter. An example which demonstrates an (optional) parameter: an (out) parameter where the caller can pass NULL if they don’t want to receive the (out) value. +Note that if the GError is returned set, the value of contents and length might +be unspecified and should therefore not be used or freed. :: -- cgit v1.2.1