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:
Emmanuele Bassi 2018-07-09 10:07:07 +01:00
parent 0d00667d01
commit 822b511cb6
2 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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.