Uli's patch is an excellent solution; I just want to keep the new
ALIGNOF macro hidden from XCB's users, as they don't need it to call
XCB.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
_c('#include "xcbext.h"')
_c('#include "%s.h"', _ns.header)
+ _c('')
+ _c('#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)')
+
if _ns.is_ext:
for (n, h) in self.imports:
_hc('#include "%s.h"', h)
_h('extern "C" {')
_h('#endif')
- _h('')
- _h('#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)')
-
if _ns.is_ext:
_h('')
_h('#define XCB_%s_MAJOR_VERSION %s', _ns.ext_name.upper(), _ns.major_version)