[vlc-devel] [PATCH] include/vlc_plugin.h: fixed problematic linkage on callback argument

Filip Roséen filip at atch.se
Mon Feb 22 21:54:51 CET 2016


I just tested to generate documentation through doxygen after supplying the
original patch, and everything works as it shall:

  - http://atch.se/vlc-devel_doxygen_result.png

Given the fact that the original patch is far more clean than the alternative
attached earlier in this discussion, my vote goes to the original.

  - https://mailman.videolan.org/pipermail/vlc-devel/2016-February/106215.html

------------------------------------------------------------------------------

On 16/02/22 20:28, Filip Roséen wrote:

> > I know that. You are not answering my question.
> 
> It depends on the doxygen configuration, but since it is used elsewhere
> in `include/vlc_plugin.h` I did not think that it would be an issue. An
> alternative patch that simply wraps the `typedef` in a conditional
> `extern "C"` is attached to this email.
> 
> > Also please avoid HTML formatting.
> 
> I send my emails (not this one) as both text/plain and text/html, as can
> be seen if you view my messages at the `vlc-devel` archive (notice that
> it states that there is an _alternative_ `text/html` attachment).
> 
>   - https://mailman.videolan.org/pipermail/vlc-devel/2016-February/106215.html
>   - https://mailman.videolan.org/pipermail/vlc-devel/2016-February/106217.html
> 
> It is up to your email-client which of the ones it displays when you
> read the message (as an example I have mine defaulting to text/plain).
> 
> I was not aware of guidelines stating that one should not use
> `multipart/alternative` on this mailing-list.
> 
> ------------------------------------------------------------------------------
> 
> On 16/02/22 21:11, Rémi Denis-Courmont wrote:
> 
> > I know that. You are not answering my question.
> > 
> > Also please avoid HTML formatting.

> diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
> index 46abe4e..e4378c2 100644
> --- a/include/vlc_plugin.h
> +++ b/include/vlc_plugin.h
> @@ -234,8 +234,17 @@ enum vlc_module_properties
>  #   define EXTERN_SYMBOL
>  #endif
>  
> +#if defined (__cplusplus)
> +extern "C" {
> +#endif
> +
>  typedef int (*vlc_set_cb) (void *, void *, int, ...);
>  
> +#if defined(__cplusplus)
> +}
> +#endif
> +
> +
>  #define vlc_plugin_set(...) vlc_set (opaque,   NULL, __VA_ARGS__)
>  #define vlc_module_set(...) vlc_set (opaque, module, __VA_ARGS__)
>  #define vlc_config_set(...) vlc_set (opaque, config, __VA_ARGS__)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160222/c7a6e296/attachment.html>


More information about the vlc-devel mailing list