[vlc-devel] [vlc-commits] demux: make p_sys void * (refs #18504, #17078)

Steve Lhomme robux4 at gmail.com
Mon Dec 4 12:43:20 CET 2017

On Mon, Dec 4, 2017 at 12:31 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> So how does this solve the unification of stream_t and demux_t
> (p_sys is void in stream_t)?

Two wrongs don't make one right. IMO void* should never be used unless
all other options failed. But apparently it's already been decided
that void * is the way to go. So this discussion is moot.

> How does this permit storing anything but a structure as opaque data (incomplete struct pointers can only represent struct pointers)?

> And most ridiculously, how does this not just shift the ODR violation issue from demux_sys_t to demux_t?

The ODR issue can only be solved on a per module basis. At least my
patch would make it explicit. Maybe a similar system forcing a local
type for all XXX_sys_t would make it ever more explicit. Ensuring that
modules don't cause issues (at least that one) for static linking.

> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list