From: Jamey Sharp Date: Wed, 24 Aug 2011 15:52:02 +0000 (-0700) Subject: Keep ALIGNOF definition out of the public namespace. X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b12038e9ae5343c4176f11d68c963c752bc35c03;hp=163c47bdc0d32785d831e4c93fea9ab7e023446b;p=free-sw%2Fxcb%2Flibxcb Keep ALIGNOF definition out of the public namespace. 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 --- diff --git a/src/c_client.py b/src/c_client.py index 7a27c1f..ad3ea22 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -175,6 +175,9 @@ def c_open(self): _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) @@ -184,9 +187,6 @@ def c_open(self): _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)