[PATCH] typedefs.h: Move some typedefs to a separate file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-11-26 at 18:29 +0100, David Henningsson wrote:
> The relationship between sinks, sources, cards, profiles, and ports
> is becoming ever more intertwined, to the point that if you try to
> include one file from the other, you're likely to end up with some
> weird error somewhere else.

If you add a circular dependency between two headers, you get errors,
which you can fix by moving the typedefs above the #include lines. I
don't think those errors are weird or difficult to deal with (once you
know the fix).

This patch has another potential benefit, though: it allows
removing includes between headers. If the unnecessary includes are
removed, that will reduce the need to recompile stuff when changing the
headers. Currently, if you touch e.g. sink.h, that will trigger a
rebuild of pretty much everything.

> Work around this by creating a new typedefs.h, which does not depend
> on anything else, and just creates a few typedefs.
> 
> (Can be expanded with more typedefs in the future if the need arises.)

What's the criteria for deciding whether a typedef should go in
typdefs.h?

-- 
Tanu


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux