mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
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:
parent
3af38a3a1a
commit
e535f22b08
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user