Commit 822b511c authored by Emmanuele Bassi's avatar Emmanuele Bassi

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.
parent 0d00667d
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment