Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Ensure to generate a flags GType for empty Flags enums
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Christian Persch committed Jan 15, 2012
1 parent b717ef8 commit 87dc862
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gio/gioenums.h
Expand Up @@ -218,7 +218,7 @@ typedef enum {
*
* Flags used when mounting a mount.
*/
typedef enum {
typedef enum /*< flags >*/ {
G_MOUNT_MOUNT_NONE = 0
} GMountMountFlags;

Expand All @@ -244,7 +244,7 @@ typedef enum {
*
* Since: 2.22
*/
typedef enum {
typedef enum /*< flags >*/ {
G_DRIVE_START_NONE = 0
} GDriveStartFlags;

Expand Down Expand Up @@ -668,7 +668,7 @@ typedef enum {
*
* Since: 2.32
**/
typedef enum {
typedef enum /*< flags >*/ {
G_RESOURCE_LOOKUP_FLAGS_NONE = 0,
} GResourceLookupFlags;

Expand Down Expand Up @@ -1515,15 +1515,14 @@ typedef enum
} GDBusObjectManagerClientFlags;

/**
<<<<<<< HEAD
* GTlsDatabaseVerifyFlags:
* @G_TLS_DATABASE_VERIFY_NONE: No verification flags
*
* Flags for g_tls_database_verify_chain().
*
* Since: 2.30
*/
typedef enum {
typedef enum /*< flags >*/ {
G_TLS_DATABASE_VERIFY_NONE = 0
} GTlsDatabaseVerifyFlags;

Expand Down

0 comments on commit 87dc862

Please sign in to comment.