[glibmm] Glib, Gio: Use _IS_REFCOUNTED_BOXEDTYPE where appropriate
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Glib, Gio: Use _IS_REFCOUNTED_BOXEDTYPE where appropriate
- Date: Wed, 30 Jan 2019 12:13:42 +0000 (UTC)
commit bae8d1736036a664152b008654d167d8171e1988
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Jan 30 13:09:15 2019 +0100
Glib, Gio: Use _IS_REFCOUNTED_BOXEDTYPE where appropriate
* gio/src/dbusintrospection.hg: Add _IS_REFCOUNTED_BOXEDTYPE to
Gio::DBus::InterfaceInfo which is used in _WRAP_PROPERTY in Gio::DBus::Proxy.
* gio/src/settingsschema.hg: Add _IS_REFCOUNTED_BOXEDTYPE. SettingsSchema is
used in _WRAP_PROPERTY in Gio::Settings.
* glib/src/bytearray.[ccg|hg]: Replace the hand-coded Value specialization
with _IS_REFCOUNTED_BOXEDTYPE.
gio/src/dbusintrospection.hg | 1 +
gio/src/settingsschema.hg | 1 +
glib/src/bytearray.ccg | 6 ------
glib/src/bytearray.hg | 16 +---------------
4 files changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/gio/src/dbusintrospection.hg b/gio/src/dbusintrospection.hg
index cdebc86b..367ccc98 100644
--- a/gio/src/dbusintrospection.hg
+++ b/gio/src/dbusintrospection.hg
@@ -105,6 +105,7 @@ public:
class InterfaceInfo final
{
_CLASS_OPAQUE_REFCOUNTED(InterfaceInfo, GDBusInterfaceInfo, NONE, g_dbus_interface_info_ref,
g_dbus_interface_info_unref)
+ _IS_REFCOUNTED_BOXEDTYPE(g_dbus_interface_info_get_type)
_IGNORE(g_dbus_interface_info_ref, g_dbus_interface_info_unref)
public:
diff --git a/gio/src/settingsschema.hg b/gio/src/settingsschema.hg
index cae4b99f..0be36712 100644
--- a/gio/src/settingsschema.hg
+++ b/gio/src/settingsschema.hg
@@ -53,6 +53,7 @@ namespace Gio
class SettingsSchema final
{
_CLASS_OPAQUE_REFCOUNTED(SettingsSchema, GSettingsSchema, NONE, g_settings_schema_ref,
g_settings_schema_unref)
+ _IS_REFCOUNTED_BOXEDTYPE
protected:
_IGNORE(g_settings_schema_ref, g_settings_schema_unref)
diff --git a/glib/src/bytearray.ccg b/glib/src/bytearray.ccg
index 003c58b7..c04fa004 100644
--- a/glib/src/bytearray.ccg
+++ b/glib/src/bytearray.ccg
@@ -50,10 +50,4 @@ ByteArray::get_data() const
return gobj()->data;
}
-GType
-ByteArray::get_type()
-{
- return g_byte_array_get_type();
-}
-
} // namespace Glib
diff --git a/glib/src/bytearray.hg b/glib/src/bytearray.hg
index ebf385b4..518080e8 100644
--- a/glib/src/bytearray.hg
+++ b/glib/src/bytearray.hg
@@ -44,6 +44,7 @@ namespace Glib
class ByteArray final
{
_CLASS_OPAQUE_REFCOUNTED(ByteArray, GByteArray, NONE, g_byte_array_ref, g_byte_array_unref)
+ _IS_REFCOUNTED_BOXEDTYPE
_IGNORE(g_byte_array_ref, g_byte_array_unref)
public:
@@ -90,21 +91,6 @@ public:
_IGNORE(g_byte_array_sort)
_WRAP_METHOD(Glib::RefPtr<ByteArray> set_size(guint length), g_byte_array_set_size, refreturn)
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
- static GType get_type() G_GNUC_CONST;
-#endif
-};
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-template <>
-class Value< Glib::RefPtr<Glib::ByteArray> > : public ValueBase_Boxed
-{
-public:
- static GType value_type() { return Glib::ByteArray::get_type(); }
- void set(const Glib::RefPtr<Glib::ByteArray>& array) { set_boxed(Glib::unwrap(array)); }
- Glib::RefPtr<Glib::ByteArray> get() { return
make_refptr_for_instance<Glib::ByteArray>(reinterpret_cast<Glib::ByteArray*>(get_boxed())); }
};
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
} // namespace Glib
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]