[Xcb] Added generation of extern "C"
Barton C Massey
bart at cs.pdx.edu
Tue Sep 9 11:23:30 PDT 2008
Thanks much for the patch!
Bart
In message <20080909121137.111c4ab6 at before> you wrote:
> --MP_/0+KIyO/MDfY5BZ7sxeAQ5DV
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> Hello,
>
> here's a patch that adds generation of extern "C" to c_client.py which
> fixes this bug:
> http://lists.freedesktop.org/archives/xcb/2008-July/003643.html
>
> Best regards,
> Carsten
>
> --MP_/0+KIyO/MDfY5BZ7sxeAQ5DV
> Content-Type: text/x-patch;
> name=0001-Added-generation-of-extern-C-for-compatibility-wit.patch
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
> filename=0001-Added-generation-of-extern-C-for-compatibility-wit.patch
>
> From 62b7b94d265bbad76874aa8d32877726da88646a Mon Sep 17 00:00:00 2001
> From: Carsten Meier <cm at trexity.de>
> Date: Tue, 9 Sep 2008 12:00:37 +0200
> Subject: [PATCH] Added generation of extern "C" for compatibility with C++
>
> The auto-generated header files now include an extern "C"
> declaration for compatibility with C++.
> ---
> src/c_client.py | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/src/c_client.py b/src/c_client.py
> index d634c27..99fe114 100755
> --- a/src/c_client.py
> +++ b/src/c_client.py
> @@ -176,6 +176,12 @@ def c_open(self):
> for (n, h) in self.imports:
> _hc('#include "%s.h"', h)
>
> + _h('')
> + _h('#ifdef __cplusplus')
> + _h('extern "C" {')
> + _h('#endif')
> +
> + if _ns.is_ext:
> _h('')
> _h('#define XCB_%s_MAJOR_VERSION %s', _ns.ext_name.upper(), _ns.major_version)
> _h('#define XCB_%s_MINOR_VERSION %s', _ns.ext_name.upper(), _ns.minor_version)
> @@ -193,6 +199,12 @@ def c_close(self):
> _h_setlevel(2)
> _c_setlevel(2)
> _hc('')
> +
> + _h('')
> + _h('#ifdef __cplusplus')
> + _h('}')
> + _h('#endif')
> +
> _h('')
> _h('#endif')
> _h('')
> --
> 1.5.4.3
>
>
> --MP_/0+KIyO/MDfY5BZ7sxeAQ5DV
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
> --MP_/0+KIyO/MDfY5BZ7sxeAQ5DV--
More information about the Xcb
mailing list