[FFmpeg-devel] compound literal in public header file

wm4 nfxjfg at googlemail.com
Thu May 17 11:21:20 EEST 2018


On Thu, 17 May 2018 00:41:10 +0200
Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2018-05-16 11:47 GMT+02:00, Steinar H. Gunderson <steinar+ffmpeg at gunderson.no>:
> > On Wed, May 16, 2018 at 11:41:23AM +0200, Tobias Rapp wrote:  
> >> Yes, I am referring to usage of the libavutil headers in C. If the macro
> >> is
> >> only hidden for C++ and available in C, that would be OK for me. But if
> >> the
> >> static inline function variant would support both C and C++, this would
> >> look
> >> like a solution where C++ users are not forced to implement a more
> >> "integrated" replacement but of course have the option to do so.  
> >
> > While we're at it, would it be possible to have extern "C" { for the
> > headers,
> > too? :-) (Wrapped in #ifdef __cplusplus, of course.)  
> 
> No, because it would give the users of the headers the impression
> that they are tested with c++ which - as you found out - they are not.

That's a pointless argument, because we definitely support C++ API
users, and any breakages are fixed immediately, or are prevented in
patch review in the first place. The presence of C only helper macros
changes nothing about this.


More information about the ffmpeg-devel mailing list