[glib/rc-align: 118/118] Document the alignment for refcounted allocations



commit 76d8fb65b2d1ad1801b95fc46c2dd8bc0cff35a4
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Nov 27 11:20:05 2018 +0000

    Document the alignment for refcounted allocations
    
    We use the same definition as malloc().

 glib/garcbox.c | 6 ++++++
 glib/grcbox.c  | 6 ++++++
 2 files changed, 12 insertions(+)
---
diff --git a/glib/garcbox.c b/glib/garcbox.c
index 02c9266aa..128d62d5c 100644
--- a/glib/garcbox.c
+++ b/glib/garcbox.c
@@ -168,6 +168,9 @@
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  *
  * Since: 2.58
@@ -192,6 +195,9 @@ g_atomic_rc_box_alloc (gsize block_size)
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  *
  * Since: 2.58
diff --git a/glib/grcbox.c b/glib/grcbox.c
index dd6f5ee70..7a9a6f6d2 100644
--- a/glib/grcbox.c
+++ b/glib/grcbox.c
@@ -290,6 +290,9 @@ g_rc_box_alloc_full (gsize    block_size,
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  *
  * Since: 2.58
@@ -314,6 +317,9 @@ g_rc_box_alloc (gsize block_size)
  * The data will be freed when its reference count drops to
  * zero.
  *
+ * The allocated data is guaranteed to be suitably aligned for any
+ * built-in type.
+ *
  * Returns: (transfer full) (not nullable): a pointer to the allocated memory
  *
  * Since: 2.58


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]