[vlc-devel] [PATCH] lib: media: fix header include from MSVC

Rémi Denis-Courmont remi at remlab.net
Mon Oct 26 16:29:52 CET 2020


Le maanantaina 26. lokakuuta 2020, 11.27.58 EET Thomas Guillem a écrit :
> On Thu, Oct 22, 2020, at 17:03, Rémi Denis-Courmont wrote:
> > Le torstaina 22. lokakuuta 2020, 13.29.36 EEST Thomas Guillem a écrit :
> > > On Thu, Oct 22, 2020, at 09:17, Thomas Guillem wrote:
> > > > I don't understand Rémi's comment about namespace violation.
> > > > 
> > > > Could you elaborate?
> > > 
> > > OK, "Exposing identifiers that you're not supposed to own is a namespace
> > > violation, potentially leading to potential name conflicts inside the
> > > final
> > > executable that includes it."
> > > 
> > > What do you think of
> > > 
> > > typedef long (*libvlc_media_read_cb)(void *opaque, unsigned char *buf,
> > > unsigned long len);
> > 
> > At this point, this would cause a lot of regression with invalid callback
> > types and with mismatched integer types, as long and ssize_t are not
> > universally identical.
> > 
> > -1
> 
> So, we deprecate the old callback type, disable it for MSVC, and add a new
> callback type using C types.

I refuse to break compatibility just for the sake of a non-OSS compiler, 
especially when compatible and ISO-conformant solutions were provided.

Not funny.

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list