[gegl] Add G_{BEGIN,END}_DECLS guards to chant/plugin headers
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Add G_{BEGIN,END}_DECLS guards to chant/plugin headers
- Date: Fri, 19 Aug 2011 21:13:56 +0000 (UTC)
commit 9d4e3d1621dd4228d571805ff647e5889c803491
Author: Jon Nordby <jononor gmail com>
Date: Fri Aug 19 22:59:01 2011 +0200
Add G_{BEGIN,END}_DECLS guards to chant/plugin headers
Without these C++ compilers will interpret the definitions as
C++ which can lead to symbol mismatches due to mangling, et.c.
For compatability with older gegl versions, consumers can
use an extern "C" block around the include statement instead.
gegl/gegl-chant.h | 2 ++
gegl/gegl-plugin.h | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gegl/gegl-chant.h b/gegl/gegl-chant.h
index 1dd1a24..1be7f37 100644
--- a/gegl/gegl-chant.h
+++ b/gegl/gegl-chant.h
@@ -28,6 +28,7 @@
#include <gegl-plugin.h>
+G_BEGIN_DECLS
GType gegl_chant_get_type (void);
typedef struct _GeglChantO GeglChantO;
@@ -846,4 +847,5 @@ gegl_chant_init_properties (GeglChant *self)
self->properties = g_slice_new0 (GeglChantO);
}
+G_END_DECLS
/****************************************************************************/
diff --git a/gegl/gegl-plugin.h b/gegl/gegl-plugin.h
index cad2b73..c9aae48 100644
--- a/gegl/gegl-plugin.h
+++ b/gegl/gegl-plugin.h
@@ -28,6 +28,8 @@
#include <glib-object.h>
#include <gegl.h>
+G_BEGIN_DECLS
+
/* Extra types needed when coding operations */
typedef struct _GeglOperation GeglOperation;
typedef struct _GeglOperationContext GeglOperationContext;
@@ -150,4 +152,5 @@ typedef struct
#include <gegl-lookup.h>
+G_END_DECLS
#endif /* __GEGL_PLUGIN_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]