[Xcb] [lib 4/5] c_client.py: Use compliant header guard

Josh Triplett josh at joshtriplett.org
Fri Nov 22 20:35:00 PST 2013


On Fri, Nov 22, 2013 at 11:27:31PM +0100, Daniel Martin wrote:
> Don't use leading underscores in the name of the header guard.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70680
> Signed-off-by: Daniel Martin <consume.noise at gmail.com>
> ---
>  src/c_client.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/c_client.py b/src/c_client.py
> index 2bca0c3..59cc19a 100644
> --- a/src/c_client.py
> +++ b/src/c_client.py
> @@ -171,8 +171,8 @@ def c_open(self):
>      _h(' * @{')
>      _h(' **/')
>      _h('')
> -    _h('#ifndef __%s_H', _ns.header.upper())
> -    _h('#define __%s_H', _ns.header.upper())
> +    _h('#ifndef %s_H', _ns.header.upper())
> +    _h('#define %s_H', _ns.header.upper())

As long as you're changing these, can you please change it to
XCB_%s_H_INCLUDED, to minimize the chance of conflict with a user
symbol?

</bikeshed>

>      _h('#include "xcb.h"')
>  
> @@ -223,7 +223,7 @@ def c_close(self):
>      _h('#endif')
>  
>      _h('')
> -    _h('#endif')
> +    _h('#endif /* %s_H */', _ns.header.upper())
>      _h('')
>      _h('/**')
>      _h(' * @}')
> -- 
> 1.8.4.2
> 
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list