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

Steve Lhomme robux4 at gmail.com
Mon Dec 4 11:17:24 CET 2017


On Mon, Dec 4, 2017 at 10:34 AM, Thomas Guillem <thomas at gllm.fr> wrote:
> OK, this will make commits harder to merge to 3.0 (and personally, I
> would have wait a little bit more before doing it) but we all agreed to
> switch all p_sys declarations to void *.

I don't think I am part of this "all" then. I would definitely not
using void* for anything when there are options. I don't remember ever
seeing that discussion happening here.

Anyway, here's a patch with an example of how to solve this without using void*.

> On Mon, Dec 4, 2017, at 10:18, Rémi Denis-Courmont wrote:
>> Le 4 décembre 2017 09:31:04 GMT+02:00, Steve Lhomme <robux4 at gmail.com> a
>> écrit :
>> >On Sun, Dec 3, 2017 at 4:58 PM, Rémi Denis-Courmont <git at videolan.org>
>> >wrote:
>> >> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun
>> >Dec  3 17:54:47 2017 +0200| [d1f94520de68ced8ded5b622c8fb94ca4e7f49cf]
>> >| committer: Rémi Denis-Courmont
>> >>
>> >> demux: make p_sys void * (refs #18504, #17078)
>> >>
>> >>>
>> >http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1f94520de68ced8ded5b622c8fb94ca4e7f49cf
>> >> ---
>> >>
>> >>  include/vlc_demux.h | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/include/vlc_demux.h b/include/vlc_demux.h
>> >> index c305e8ccd3..fda7cecff5 100644
>> >> --- a/include/vlc_demux.h
>> >> +++ b/include/vlc_demux.h
>> >> @@ -88,7 +88,7 @@ struct demux_t
>> >>          unsigned int i_update;  /* Demux sets them on change,
>> >>                                     Input removes them once take into
>> >account*/
>> >>      } info;
>> >> -    demux_sys_t *p_sys;
>> >> +    void *p_sys;
>> >
>> >I don't see the improvement. I can see a major PITA to use it now.
>> >
>> >>      /* Weak link to parent input */
>> >>      input_thread_t *p_input;
>> >>
>> >> _______________________________________________
>> >> vlc-commits mailing list
>> >> vlc-commits at videolan.org
>> >> https://mailman.videolan.org/listinfo/vlc-commits
>> >_______________________________________________
>> >vlc-devel mailing list
>> >To unsubscribe or modify your subscription options:
>> >https://mailman.videolan.org/listinfo/vlc-devel
>>
>> I don't get to decide how C(++) works, and you don't either. The
>> justification references were provided in the commit,  but thanks for
>> being a dick.
>>
>> If you don't like how it is a PITA in C++, you are more than welcome to
>> switch to C, which is the official language for VLC still.
>> --
>> 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
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-RFC-fix-demux_sys_t-ODR-for-C-modules.patch
Type: application/octet-stream
Size: 8942 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20171204/296f17e0/attachment-0001.obj>


More information about the vlc-devel mailing list