[glib: 2/4] glib: Drop G_GNUC_MALLOC usage from various allocation functions
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/4] glib: Drop G_GNUC_MALLOC usage from various allocation functions
- Date: Wed, 22 Aug 2018 11:20:59 +0000 (UTC)
commit 082730fc3e10a05c7938c06a27c875efd32a729b
Author: Philip Withnall <withnall endlessm com>
Date: Wed Aug 22 11:09:01 2018 +0100
glib: Drop G_GNUC_MALLOC usage from various allocation functions
These are our most critically incorrect uses of G_GNUC_MALLOC. See the
previous commit for details.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://gitlab.gnome.org/GNOME/glib/issues/1465
glib/grcbox.h | 4 ++--
glib/gslice.h | 2 +-
glib/gstrfuncs.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/grcbox.h b/glib/grcbox.h
index e66f1ff6d..c92791260 100644
--- a/glib/grcbox.h
+++ b/glib/grcbox.h
@@ -32,7 +32,7 @@ GLIB_AVAILABLE_IN_2_58
gpointer g_rc_box_alloc0 (gsize block_size) G_GNUC_MALLOC
G_GNUC_ALLOC_SIZE(1);
GLIB_AVAILABLE_IN_2_58
gpointer g_rc_box_dup (gsize block_size,
- gconstpointer mem_block) G_GNUC_MALLOC
G_GNUC_ALLOC_SIZE(1);
+ gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1);
GLIB_AVAILABLE_IN_2_58
gpointer g_rc_box_acquire (gpointer mem_block);
GLIB_AVAILABLE_IN_2_58
@@ -50,7 +50,7 @@ GLIB_AVAILABLE_IN_2_58
gpointer g_atomic_rc_box_alloc0 (gsize block_size) G_GNUC_MALLOC
G_GNUC_ALLOC_SIZE(1);
GLIB_AVAILABLE_IN_2_58
gpointer g_atomic_rc_box_dup (gsize block_size,
- gconstpointer mem_block) G_GNUC_MALLOC
G_GNUC_ALLOC_SIZE(1);
+ gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1);
GLIB_AVAILABLE_IN_2_58
gpointer g_atomic_rc_box_acquire (gpointer mem_block);
GLIB_AVAILABLE_IN_2_58
diff --git a/glib/gslice.h b/glib/gslice.h
index 80762761f..ff8b02a65 100644
--- a/glib/gslice.h
+++ b/glib/gslice.h
@@ -34,7 +34,7 @@ GLIB_AVAILABLE_IN_ALL
gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
GLIB_AVAILABLE_IN_ALL
gpointer g_slice_copy (gsize block_size,
- gconstpointer mem_block) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
+ gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1);
GLIB_AVAILABLE_IN_ALL
void g_slice_free1 (gsize block_size,
gpointer mem_block);
diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
index d09de568c..b8790fc78 100644
--- a/glib/gstrfuncs.h
+++ b/glib/gstrfuncs.h
@@ -255,7 +255,7 @@ gchar* g_strescape (const gchar *source,
GLIB_AVAILABLE_IN_ALL
gpointer g_memdup (gconstpointer mem,
- guint byte_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(2);
+ guint byte_size) G_GNUC_ALLOC_SIZE(2);
/* NULL terminated string arrays.
* g_strsplit(), g_strsplit_set() split up string into max_tokens tokens
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]