[FFmpeg-devel] [PATCH/RFC] Constify src in av_fifo_generic_write()
Tue Feb 23 13:14:03 CET 2010
On Tue, Feb 23, 2010 at 10:50:03AM +0100, Tomas H?rdin wrote:
> Good morning
> This is a rather simple patch that merely makes av_fifo_generic_write()
> take const void *src instead of just void *src. It causes no warnings
> and regression tests pass.
> The reason is simple: guarantee the user that the function does not
> modify src.
> One small issue though: this necessitated changing func to int(*)(const
> void*,void*,int), which is OK for all code within FFmpeg. However, this
> seems to count as a minor API change since g++ (and gcc I presume) won't
> allow implicitly casting int(*)(void*,void*,int) to int(*)(const
> void*,void*,int). I presume that part requires a bit of discussion,
> which is why I marked this thread "RFC".
> Patch attached.
ive added a comment explaining why src cannot be const as you are at
least the 2nd person trying to introduce this bug
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel