]> git.sesse.net Git - vlc/commitdiff
Add LIBVLC_MALLOC function attribute
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 24 Sep 2009 17:46:40 +0000 (20:46 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 24 Sep 2009 17:46:40 +0000 (20:46 +0300)
when the return value is a *unique* pointer (or NULL)...

include/vlc_common.h

index 87a0610955af20819abfe0446d8e9a672bc29713..2244cdbbf0dea75dcbe908dceaf91dbdf508001f 100644 (file)
 #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
 
 /*****************************************************************************