[FFmpeg-devel] bprint.h can't be included in C++ code
Vadim Kalinsky
vadim at kalinsky.ru
Mon Nov 24 17:20:25 CET 2014
> Nit: space after commas.
> Is it necessary to typedef the structure on top of declaring it? In C, this: {...} is legal, no need to typedef it.
> Apart from that, I think the helper structure should be scoped in the ff_namespace
> Nit: no empty line between doxy and declaration.
Patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Squashed-commits.patch
Type: application/octet-stream
Size: 1528 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141124/821abd09/attachment.obj>
-------------- next part --------------
> And I wonder: does Doxygen understand the resulting construct?
I guess that (not good) behaviour is not changed.
BTW, isn't the whole stuff slightly over-engineered? Why is "binary compatibility" needed (and with what?).
Wouldn't it be easier in terms of compatibility, readability and doxygenability to define simple C structure?
struct AVBPrint {
char *str; /**< string so far */
unsigned len; /**< length so far */
unsigned size; /**< allocated memory */
unsigned size_max; /**< maximum allocated memory */
char reserved_internal_buffer[1024];
};
Vadim Kalinsky
kalinsky.ru
More information about the ffmpeg-devel
mailing list