[gegl] gegl: in gegl-op.h, add enum_value_skip() macro
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: in gegl-op.h, add enum_value_skip() macro
- Date: Fri, 21 Sep 2018 05:52:19 +0000 (UTC)
commit 0ccccc1f389b26372efed42167caac65aceb1cf4
Author: Ell <ell_se yahoo com>
Date: Fri Sep 21 01:35:36 2018 -0400
gegl: in gegl-op.h, add enum_value_skip() macro
... which defines an enum value, without registring it with GLib.
Can be useful for defining internal enum values, or for temporarily
disabling the availability of enum values without changing the
code.
gegl/gegl-op.h | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gegl/gegl-op.h b/gegl/gegl-op.h
index bcf7aeba7..fdfac9795 100644
--- a/gegl/gegl-op.h
+++ b/gegl/gegl-op.h
@@ -286,12 +286,14 @@ gegl_module_register (GTypeModule *module)
#define enum_start(enum_name) typedef enum {
#define enum_value(value, nick, name) value ,
+#define enum_value_skip(value) value ,
#define enum_end(enum) } enum ;
#include GEGL_OP_C_FILE
#undef enum_start
#undef enum_value
+#undef enum_value_skip
#undef enum_end
#ifdef GETTEXT_PACKAGE
@@ -311,6 +313,8 @@ static GType enum_name ## _get_type (void) \
#define enum_value(value, nick, name) \
{ value, name, nick },
+#define enum_value_skip(value)
+
#define enum_end(enum) \
{ 0, NULL, NULL } \
}; \
@@ -346,9 +350,11 @@ static GType enum_name ## _get_type (void) \
#undef property_path
#undef enum_start
#undef enum_value
+#undef enum_value_skip
#undef enum_end
#define enum_start(enum_name)
#define enum_value(value, nick, name)
+#define enum_value_skip(value)
#define enum_end(enum)
/* Properties */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]