[glib/rc-align] Document the alignment for refcounted allocations
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/rc-align] Document the alignment for refcounted allocations
- Date: Tue, 27 Nov 2018 11:21:08 +0000 (UTC)
commit f511b14c759e30cbf313c6689e8d3c2bd75cff12
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]