summaryrefslogtreecommitdiff
path: root/glib/gmacros.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-11-28 19:12:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-11-28 19:12:04 +0000
commit379e87466d0896050e2dec1db5fc1c71393b08a1 (patch)
tree952e211f426c1cccf208afa468f294a9d1e2ae1f /glib/gmacros.h
parent75a1d303ef56d474f2b43393592d48801daddcd1 (diff)
downloadglib-379e87466d0896050e2dec1db5fc1c71393b08a1.tar.gz
Mark functions with G_GNUC_MALLOC when appropriate.
2004-11-28 Matthias Clasen <mclasen@redhat.com> * glib/gconvert.h: * glib/gkeyfile.h: * glib/gmem.h: * glib/gstrfuncs.h: * glib/gunicode.h: * glib/gutils.h: Mark functions with G_GNUC_MALLOC when appropriate. * glib/glib.symbols: Add G_GNUC_MALLOC annotations. * glib/gmacros.h (G_GNUC_MALLOC): Add a macro for __attribute__((__malloc__)). (#61780)
Diffstat (limited to 'glib/gmacros.h')
-rw-r--r--glib/gmacros.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/glib/gmacros.h b/glib/gmacros.h
index d205053fb..6f6420622 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -69,6 +69,8 @@
__attribute__((__unused__))
#define G_GNUC_NO_INSTRUMENT \
__attribute__((__no_instrument_function__))
+#define G_GNUC_MALLOC \
+ __attribute__((__malloc__))
#else /* !__GNUC__ */
#define G_GNUC_PRINTF( format_idx, arg_idx )
#define G_GNUC_SCANF( format_idx, arg_idx )
@@ -77,6 +79,7 @@
#define G_GNUC_CONST
#define G_GNUC_UNUSED
#define G_GNUC_NO_INSTRUMENT
+#define G_GNUC_MALLOC
#endif /* !__GNUC__ */
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)