[vlc-devel] commit: Add LIBVLC_MALLOC function attribute ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Sep 24 19:52:36 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 24 20:46:40 2009 +0300| [11453720e5593efb90e8261228ff5a8492013fef] | committer: Rémi Denis-Courmont 

Add LIBVLC_MALLOC function attribute

when the return value is a *unique* pointer (or NULL)...

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=11453720e5593efb90e8261228ff5a8492013fef
---

 include/vlc_common.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 87a0610..2244cdb 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -60,9 +60,11 @@
 #ifdef __GNUC__
 #   define LIBVLC_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
 #   define LIBVLC_USED __attribute__ ((warn_unused_result))
+#   define LIBVLC_MALLOC __attribute__ ((malloc))
 #else
 #   define LIBVLC_FORMAT(x,y)
 #   define LIBVLC_USED
+#   define LIBVLC_MALLOC
 #endif
 
 /*****************************************************************************




More information about the vlc-devel mailing list