[vlc-devel] LIBVLC_DEPRECATED usage

Olivier Aubert olivier.aubert at liris.cnrs.fr
Fri Jan 13 09:25:38 CET 2012


Thanks for the comment, but how so? From my understanding of cpp, the
following code (from libvlc.h:49) defines LIBVLC_DEPRECATED as strictly
equivalent to LIBVLC_API except when using gcc > 3.0, where it adds the
deprecated attribute.

#ifdef __LIBVLC__
/* Avoid unuseful warnings from libvlc with our deprecated APIs */
#   define LIBVLC_DEPRECATED LIBVLC_API
#elif defined(__GNUC__) && \
      (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define LIBVLC_DEPRECATED LIBVLC_API __attribute__((deprecated))
#else
# define LIBVLC_DEPRECATED LIBVLC_API
#endif


On Fri, 2012-01-13 at 08:02 +0100, Rémi Denis-Courmont wrote:
> On Thu, 12 Jan 2012 23:55:21 +0100, Olivier Aubert
> <olivier.aubert at liris.cnrs.fr> wrote:
> > I noticed a discrepancy in the use of LIBVLC_DEPRECATED: in libvlc.h, it
> > is used in addition to LIBVLC_API, e.g. :
> > 
> > LIBVLC_DEPRECATED
> > LIBVLC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t
> > *p_instance );
> 
> That's obviously correct. LIBVLC_DEPRECATED does not "include" LIBVLC_API
> in its own definition.
> 





More information about the vlc-devel mailing list