[glib] Ensure to generate a flags GType for empty Flags enums



commit 87dc86240835313f0cfe503b2d68a09301ad6240
Author: Christian Persch <chpe gnome org>
Date:   Sun Jan 15 00:34:56 2012 +0100

    Ensure to generate a flags GType for empty Flags enums
    
    When the flags enum only has the default NONE = 0 entry, glib-mkenums
    creates an enum type for it, not a flags type. Add an annotation to the
    enum to ensure the correct GType is created.
    
    Bug #667938.

 gio/gioenums.h |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gio/gioenums.h b/gio/gioenums.h
index 8e0ec32..852941d 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -218,7 +218,7 @@ typedef enum {
  *
  * Flags used when mounting a mount.
  */
-typedef enum {
+typedef enum /*< flags >*/ {
   G_MOUNT_MOUNT_NONE = 0
 } GMountMountFlags;
 
@@ -244,7 +244,7 @@ typedef enum {
  *
  * Since: 2.22
  */
-typedef enum {
+typedef enum /*< flags >*/ {
   G_DRIVE_START_NONE = 0
 } GDriveStartFlags;
 
@@ -668,7 +668,7 @@ typedef enum {
  * 
  * Since: 2.32
  **/
-typedef enum {
+typedef enum /*< flags >*/ {
   G_RESOURCE_LOOKUP_FLAGS_NONE       = 0,
 } GResourceLookupFlags;
 
@@ -1515,7 +1515,6 @@ typedef enum
 } GDBusObjectManagerClientFlags;
 
 /**
-<<<<<<< HEAD
  * GTlsDatabaseVerifyFlags:
  * @G_TLS_DATABASE_VERIFY_NONE: No verification flags
  *
@@ -1523,7 +1522,7 @@ typedef enum
  *
  * Since: 2.30
  */
-typedef enum {
+typedef enum /*< flags >*/ {
   G_TLS_DATABASE_VERIFY_NONE = 0
 } GTlsDatabaseVerifyFlags;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]