mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
Update rcbox annotations for acquire/release functions
The accepted behaviour for reference counting functions can be described as such: - acquire: takes a pointer to a memory area and returns the same pointer with its reference count increased; this means that the returned value's ownership is fully transfered from the callee to the caller - release: takes a pointer to a memory area and drops the reference count; this means that the caller transfers the ownership of the argument to the callee These annotations are mostly meant for documentation purposes: high level language bindings are unlikely to use them, as they have their own reference counting semantics on top of GLib's own, and they should not expose this API to their own consumers.
This commit is contained in:
parent
0d00667d01
commit
822b511cb6
@ -274,7 +274,7 @@ gpointer
|
||||
*
|
||||
* Atomically acquires a reference on the data pointed by @mem_block.
|
||||
*
|
||||
* Returns: (transfer none) (not nullable): a pointer to the data,
|
||||
* Returns: (transfer full) (not nullable): a pointer to the data,
|
||||
* with its reference count increased
|
||||
*
|
||||
* Since: 2.58
|
||||
@ -298,7 +298,7 @@ gpointer
|
||||
|
||||
/**
|
||||
* g_atomic_rc_box_release:
|
||||
* @mem_block: (not nullable): a pointer to reference counted data
|
||||
* @mem_block: (transfer full) (not nullable): a pointer to reference counted data
|
||||
*
|
||||
* Atomically releases a reference on the data pointed by @mem_block.
|
||||
*
|
||||
@ -315,7 +315,7 @@ g_atomic_rc_box_release (gpointer mem_block)
|
||||
|
||||
/**
|
||||
* g_atomic_rc_box_release_full:
|
||||
* @mem_block: (not nullable): a pointer to reference counted data
|
||||
* @mem_block: (transfer full) (not nullable): a pointer to reference counted data
|
||||
* @clear_func: (not nullable): a function to call when clearing the data
|
||||
*
|
||||
* Atomically releases a reference on the data pointed by @mem_block.
|
||||
|
@ -351,7 +351,7 @@ gpointer
|
||||
*
|
||||
* Acquires a reference on the data pointed by @mem_block.
|
||||
*
|
||||
* Returns: (transfer none) (not nullable): a pointer to the data,
|
||||
* Returns: (transfer full) (not nullable): a pointer to the data,
|
||||
* with its reference count increased
|
||||
*
|
||||
* Since: 2.58
|
||||
@ -375,7 +375,7 @@ gpointer
|
||||
|
||||
/**
|
||||
* g_rc_box_release:
|
||||
* @mem_block: (not nullable): a pointer to reference counted data
|
||||
* @mem_block: (transfer full) (not nullable): a pointer to reference counted data
|
||||
*
|
||||
* Releases a reference on the data pointed by @mem_block.
|
||||
*
|
||||
@ -392,7 +392,7 @@ g_rc_box_release (gpointer mem_block)
|
||||
|
||||
/**
|
||||
* g_rc_box_release_full:
|
||||
* @mem_block: (not nullable): a pointer to reference counted data
|
||||
* @mem_block: (transfer full) (not nullable): a pointer to reference counted data
|
||||
* @clear_func: (not nullable): a function to call when clearing the data
|
||||
*
|
||||
* Releases a reference on the data pointed by @mem_block.
|
||||
|
Loading…
Reference in New Issue
Block a user