On 05/23/2012 08:14 AM, [email protected] wrote:
> From: Yan Wang<[email protected]>
>
> Add extern "C" macro definition for C++.
This plays merry hell with most auto-indentation programs and some
editors though. May I suggest something like this instead?
#ifdef __cplusplus
#define DECL_START extern "C" {
#define DECL_END }
#define
#else
#define DECL_START /* nothing */
#define DECL_END /* more of nothing */
#endif
> ---
> cursor/wayland-cursor.h | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/cursor/wayland-cursor.h b/cursor/wayland-cursor.h
> index 154cd84..f8bf8d1 100644
> --- a/cursor/wayland-cursor.h
> +++ b/cursor/wayland-cursor.h
> @@ -25,6 +25,10 @@
>
> #include<stdint.h>
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> enum wl_cursor_type {
> WL_CURSOR_BOTTOM_LEFT,
> WL_CURSOR_BOTTOM_RIGHT,
> @@ -75,4 +79,8 @@ wl_cursor_theme_get_cursor_by_name(struct wl_cursor_theme
> *theme,
> struct wl_buffer *
> wl_cursor_image_get_buffer(struct wl_cursor_image *image);
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
> #endif
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel