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

Tanu Kaskinen tanuk at iki.fi
Fri Nov 27 03:40:03 PST 2015

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


More information about the pulseaudio-discuss mailing list