Only #include directly referenced module header files
authorKeith Packard <keithp@keithp.com>
Wed, 12 Feb 2014 22:15:44 +0000 (14:15 -0800)
committerUli Schlachter <psychon@znc.in>
Sat, 22 Mar 2014 13:44:52 +0000 (14:44 +0100)
This avoids having the nested header files also included at the top
level, which is more efficient.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
src/c_client.py

index aaaab2e..c94a9e6 100644 (file)
@@ -190,7 +190,7 @@ def c_open(self):
     _c('#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)')
 
     if _ns.is_ext:
-        for (n, h) in self.imports:
+        for (n, h) in self.direct_imports:
             _hc('#include "%s.h"', h)
 
     _h('')