[glibmm/glibmm-2-58] Gio: Remove NO_GTYPE from some _WRAP_ENUMs



commit 17e3b167900b95986babeb8fcabd335881ea4d53
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Mon Jan 7 15:20:18 2019 +0100

    Gio: Remove NO_GTYPE from some _WRAP_ENUMs
    
    NO_GTYPE can't be used in _WRAP_ENUM if the enum is used in _WRAP_PROPERTY.
    The error is noticed only during execution of code that calls the generated
    property_*() method. Fixes #37

 gio/src/application.hg           | 2 +-
 gio/src/dbusinterfaceskeleton.hg | 2 +-
 gio/src/dbusmessage.hg           | 2 +-
 gio/src/dbusproxy.hg             | 2 +-
 gio/src/dbusserver.hg            | 4 +---
 gio/src/enums.hg                 | 7 ++-----
 gio/src/mountoperation.hg        | 4 +---
 gio/src/networkmonitor.hg        | 2 +-
 glib/src/date.hg                 | 2 +-
 9 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 28db5c76..67fb5a35 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -34,7 +34,7 @@ _PINCLUDE(glibmm/private/object_p.h)
 namespace Gio
 {
 
-_WRAP_ENUM(ApplicationFlags, GApplicationFlags, NO_GTYPE)
+_WRAP_ENUM(ApplicationFlags, GApplicationFlags)
 
 /** Application - Core application class.
  * An Application is the foundation of an application, unique for a given
diff --git a/gio/src/dbusinterfaceskeleton.hg b/gio/src/dbusinterfaceskeleton.hg
index 18612d3b..2261216a 100644
--- a/gio/src/dbusinterfaceskeleton.hg
+++ b/gio/src/dbusinterfaceskeleton.hg
@@ -27,7 +27,7 @@ namespace Gio
 namespace DBus
 {
 
-_WRAP_ENUM(InterfaceSkeletonFlags, GDBusInterfaceSkeletonFlags, NO_GTYPE)
+_WRAP_ENUM(InterfaceSkeletonFlags, GDBusInterfaceSkeletonFlags, gtype_func 
g_dbus_interface_skeleton_flags_get_type)
 
 class InterfaceInfo;
 class Connection;
diff --git a/gio/src/dbusmessage.hg b/gio/src/dbusmessage.hg
index 22076045..da0a382a 100644
--- a/gio/src/dbusmessage.hg
+++ b/gio/src/dbusmessage.hg
@@ -34,7 +34,7 @@ namespace DBus
 _WRAP_ENUM(MessageType, GDBusMessageType, s#^DBUS_##, NO_GTYPE)
 _WRAP_ENUM(MessageFlags, GDBusMessageFlags, s#^DBUS_##, NO_GTYPE)
 _WRAP_ENUM(MessageHeaderField, GDBusMessageHeaderField, s#^DBUS_##, NO_GTYPE)
-_WRAP_ENUM(CapabilityFlags, GDBusCapabilityFlags, s#^DBUS_##, NO_GTYPE)
+_WRAP_ENUM(CapabilityFlags, GDBusCapabilityFlags, s#^DBUS_##, gtype_func g_dbus_capability_flags_get_type)
 
 _GMMPROC_EXTRA_NAMESPACE(DBus)
 
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg
index de241b76..1c753f06 100644
--- a/gio/src/dbusproxy.hg
+++ b/gio/src/dbusproxy.hg
@@ -32,7 +32,7 @@ namespace DBus
 //The GMMPROC_EXTRA_NAMESPACE() macro is a hint to generate_wrap_init.pl to put it in the DBus sub-namespace
 _GMMPROC_EXTRA_NAMESPACE(DBus)
 
-_WRAP_ENUM(ProxyFlags, GDBusProxyFlags, s#^DBUS_##, NO_GTYPE)
+_WRAP_ENUM(ProxyFlags, GDBusProxyFlags, s#^DBUS_##, gtype_func g_dbus_proxy_flags_get_type)
 
 /** A client-side proxy.
  * This is a base class used for proxies to access a D-Bus interface on
diff --git a/gio/src/dbusserver.hg b/gio/src/dbusserver.hg
index 64ed21b7..6f1bb986 100644
--- a/gio/src/dbusserver.hg
+++ b/gio/src/dbusserver.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2010 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -30,7 +28,7 @@ namespace Gio
 namespace DBus
 {
 
-_WRAP_ENUM(ServerFlags, GDBusServerFlags, s#^DBUS_##, NO_GTYPE)
+_WRAP_ENUM(ServerFlags, GDBusServerFlags, s#^DBUS_##, gtype_func g_dbus_server_flags_get_type)
 
 _GMMPROC_EXTRA_NAMESPACE(DBus)
 
diff --git a/gio/src/enums.hg b/gio/src/enums.hg
index e38c5db9..a80830b9 100644
--- a/gio/src/enums.hg
+++ b/gio/src/enums.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -24,12 +22,11 @@ _DEFS(giomm,gio)
 namespace Gio
 {
 
-_WRAP_ENUM(DataStreamByteOrder, GDataStreamByteOrder, NO_GTYPE)
-_WRAP_ENUM(DataStreamNewlineType, GDataStreamNewlineType, NO_GTYPE)
+_WRAP_ENUM(DataStreamByteOrder, GDataStreamByteOrder)
+_WRAP_ENUM(DataStreamNewlineType, GDataStreamNewlineType)
 _WRAP_ENUM(ErrorEnum, GIOErrorEnum, NO_GTYPE)
 _WRAP_ENUM(SocketFamily, GSocketFamily)
 _WRAP_ENUM(TlsAuthenticationMode, GTlsAuthenticationMode)
 _WRAP_ENUM(TlsCertificateFlags, GTlsCertificateFlags)
 
 } // namespace Gio
-
diff --git a/gio/src/mountoperation.hg b/gio/src/mountoperation.hg
index 1e128526..1e69765e 100644
--- a/gio/src/mountoperation.hg
+++ b/gio/src/mountoperation.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -27,7 +25,7 @@ namespace Gio
 {
 
 _WRAP_ENUM(AskPasswordFlags, GAskPasswordFlags, NO_GTYPE)
-_WRAP_ENUM(PasswordSave, GPasswordSave, NO_GTYPE)
+_WRAP_ENUM(PasswordSave, GPasswordSave)
 _WRAP_ENUM(MountOperationResult, GMountOperationResult, NO_GTYPE)
 
 /** Authentication methods for mountable locations.
diff --git a/gio/src/networkmonitor.hg b/gio/src/networkmonitor.hg
index 4ed6fc9f..c3d75c94 100644
--- a/gio/src/networkmonitor.hg
+++ b/gio/src/networkmonitor.hg
@@ -31,7 +31,7 @@ typedef struct _GNetworkMonitorInterface GNetworkMonitorInterface;
 namespace Gio
 {
 
-_WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity, NO_GTYPE)
+_WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity)
 
 
 /** TODO
diff --git a/glib/src/date.hg b/glib/src/date.hg
index 64d4e9e4..4c29fb59 100644
--- a/glib/src/date.hg
+++ b/glib/src/date.hg
@@ -36,7 +36,7 @@ public:
   using Day = guint8 ;
   using Year = guint16;
 
-  _WRAP_ENUM(Month, GDateMonth, s#^DATE_##, NO_GTYPE, get_type_func=)
+  _WRAP_ENUM(Month, GDateMonth, s#^DATE_##, NO_GTYPE)
   _WRAP_ENUM(Weekday, GDateWeekday, s#^DATE_##, NO_GTYPE)
   _WRAP_ENUM(DMY, GDateDMY, s#^DATE_##, NO_GTYPE)
 


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