[Ffmpeg-devel] some quick questions about swscaler integration

Rich Felker dalias
Sun Mar 19 21:28:13 CET 2006


On Sun, Mar 19, 2006 at 02:55:08PM +0000, M?ns Rullg?rd wrote:
> Rich Felker <dalias at aerifal.cx> writes:
> 
> > On Sun, Mar 19, 2006 at 12:19:45PM +0000, M?ns Rullg?rd wrote:
> >> Now that you mention it, maybe the Colin was talking about a situation
> >> like this:
> >> 
> >> a.h:
> >> struct a {
> >>     struct b *b;
> >> };
> >> 
> >> b.h:
> >> struct b {
> >>     struct a *a;
> >> };
> >> 
> >> In this case, those files are interdependent enough that they should
> >> probably be merged.  Alternatively, both structs can be declared in a
> >> separate header that both a.h and b.h #include.
> >
> > No need. Just write "struct b;" before the declaration of struct a,
> > and vice versa. No need for a definition.
> 
> I said "declared", not "defined".  Scattering random declarations
> across the code like this *will* lead to trouble.

struct declarations like this can never cause trouble. If a struct by
the given name "a" is used then "struct a;" is always ok.

Rich





More information about the ffmpeg-devel mailing list