gmem: Fix introspection annotations for g_clear_pointer() and g_clear_fd()

They were mixing up `(optional)` and `(nullable)`, and didn’t correctly
annotate the arguments as `(inout)` or `(transfer full)`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2793
This commit is contained in:
Philip Withnall 2022-11-22 16:25:39 +00:00
parent 3af38a3a1a
commit e535f22b08
2 changed files with 3 additions and 3 deletions

View File

@ -232,8 +232,8 @@ g_free (gpointer mem)
/**
* g_clear_pointer: (skip)
* @pp: (not nullable): a pointer to a variable, struct member etc. holding a
* pointer
* @pp: (nullable) (not optional) (inout) (transfer full): a pointer to a
* variable, struct member etc. holding a pointer
* @destroy: a function to which a gpointer can be passed, to destroy *@pp
*
* Clears a reference to a variable.

View File

@ -1839,7 +1839,7 @@ g_close (gint fd,
/**
* g_clear_fd: (skip)
* @fd_ptr: (not nullable): a pointer to a file descriptor
* @fd_ptr: (not optional) (inout) (transfer full): a pointer to a file descriptor
* @error: Used to return an error on failure
*
* If @fd_ptr points to a file descriptor, close it and return