On 30/07/2019 23.07, Eduardo Habkost wrote: > Sometimes we use the 'struct' keyword to help us reduce > dependencies between header files. Document that practice. > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> > --- > I wonder if this is too terse? Should we give examples? > --- > HACKING | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/HACKING b/HACKING > index 0fc3e0fc04..112685bdaf 100644 > --- a/HACKING > +++ b/HACKING > @@ -101,6 +101,8 @@ it points to, or it is aliased to another pointer that is. > > 2.3. Typedefs > Typedefs are used to eliminate the redundant 'struct' keyword. > +However, the 'struct' keyword may be sometimes used in header > +files to avoid unnecessary dependencies between headers.
See also the discussion earlier this year: https://www.mail-archive.com/qemu-devel@nongnu.org/msg586180.html ... and we should merge HACKING and CODING_STYLE finally (that was on my private TODO list, but I never found the time to do it). Thomas