On Mon, Jun 12, 2017 at 3:29 PM, Diego Biurrun <di...@biurrun.de> wrote: > On Sun, Jun 11, 2017 at 11:49:45PM +0200, Hendrik Leppkes wrote: >> On Sun, Jun 11, 2017 at 11:45 PM, Diego Biurrun <di...@biurrun.de> wrote: >> > On Sun, Jun 11, 2017 at 11:27:07PM +0200, Hendrik Leppkes wrote: >> >> On Sun, Jun 11, 2017 at 11:22 PM, Diego Biurrun <di...@biurrun.de> wrote: >> >> > On Sun, Jun 11, 2017 at 10:52:18AM +0200, Hendrik Leppkes wrote: >> >> >> On Sat, Jun 10, 2017 at 4:47 PM, Diego Biurrun <di...@biurrun.de> >> >> >> wrote: >> >> >> > @@ -222,7 +222,7 @@ void av_log_set_level(int level); >> >> >> > * @param callback A logging function with a compatible signature. >> >> >> > */ >> >> >> > -void av_log_set_callback(void (*callback)(void*, int, const char*, >> >> >> > va_list)); >> >> >> > +void av_log_set_callback(void (*callback)(const void *, int, const >> >> >> > char *, va_list)); >> >> >> >> >> >> Doesn't that break every caller of av_log_set_callback because they >> >> >> now have a mis-matching function signature? >> >> > >> >> > No? They'll get a warning, yes .. >> >> >> >> Well I just tried and my build breaks (C++ code calling that function, >> >> fwiw). >> > >> > Doh - what error do you get? >> > >> >> error C2664: 'void av_log_set_callback(void (__cdecl *)(const void >> *,int,const char *,va_list))': cannot convert argument 1 from 'void >> (__cdecl *)(void *,int,const char *,va_list)' to 'void (__cdecl >> *)(const void *,int,const char *,va_list)' >> (from MSVC) >> >> C++ doesn't like implicit conversions of function pointers, it needs >> to match exactly. > > That is .. C++ .. >
Type safety is a bad thing? :) - Hendrik _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel