[glibmm] Fix some TODO comments requiring ABI break
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Fix some TODO comments requiring ABI break
- Date: Tue, 27 Dec 2016 14:34:26 +0000 (UTC)
commit f8e1885a493c76c1d03bac408fb3286858efb968
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Tue Dec 27 15:30:49 2016 +0100
Fix some TODO comments requiring ABI break
* gio/src/gio_vfuncs.defs: Add GAsyncResult::is_tagged():
* gio/src/action.hg: get_state_hint_variant() returns VariantContainerBase.
* gio/src/actiongroup.hg: Remove the deprecated get_action_state_hint().
* gio/src/asyncresult.hg: Add is_tagged_vfunc().
* glib/src/checksum.hg: update(): The length parameter is a gssize.
gio/src/action.hg | 5 +----
gio/src/actiongroup.hg | 3 ---
gio/src/asyncresult.hg | 11 ++++-------
gio/src/gio_vfuncs.defs | 8 ++++++++
glib/src/checksum.hg | 5 +----
5 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/gio/src/action.hg b/gio/src/action.hg
index ffff582..b9b5993 100644
--- a/gio/src/action.hg
+++ b/gio/src/action.hg
@@ -102,10 +102,7 @@ public:
template <typename T_Value>
void get_state_hint(T_Value& value) const;
- //TODO: When we can break ABI, Return a Glib::VariantContainerBase,
- // as we already do for ActionGroup::get_action_state_hint(),
- // because that is what this returns (to specify a range).
- _WRAP_METHOD(Glib::VariantBase get_state_hint_variant() const, g_action_get_state_hint)
+ _WRAP_METHOD(Glib::VariantContainerBase get_state_hint_variant() const, g_action_get_state_hint)
_WRAP_METHOD(bool get_enabled() const, g_action_get_enabled)
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index 5877e20..6d250ba 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -75,9 +75,6 @@ public:
_WRAP_METHOD(Glib::VariantType get_action_parameter_type(const Glib::ustring& action_name) const,
g_action_group_get_action_parameter_type)
_WRAP_METHOD(Glib::VariantType get_action_state_type(const Glib::ustring& action_name) const,
g_action_group_get_action_state_type)
-
- _WRAP_METHOD(Glib::VariantContainerBase get_action_state_hint(const Glib::ustring& action_name) const,
g_action_group_get_action_state_hint, deprecated "Use the get_action_state() method that takes an output
parameter instead.")
-
//TODO: How do we check for a nullptr Variant?
/**
* Requests a hint about the valid range of values for the state of the
diff --git a/gio/src/asyncresult.hg b/gio/src/asyncresult.hg
index 31b6a15..f0d2d68 100644
--- a/gio/src/asyncresult.hg
+++ b/gio/src/asyncresult.hg
@@ -117,15 +117,12 @@ public:
_WRAP_METHOD(bool is_tagged(gpointer source_tag) const, g_async_result_is_tagged)
-
- // TODO: For some reason, the compiler cannot find an unwrap() for ObjectBase.
+ // The compiler cannot find an unwrap() for ObjectBase, because
+ // ObjectBase::BaseObjectType is not declared.
//#m4 _CONVERSION(`Glib::RefPtr<Glib::ObjectBase>',`GObject*',__CONVERT_REFPTR_TO_P)
#m4 _CONVERSION(`Glib::RefPtr<Glib::ObjectBase>',`GObject*',`unwrap_objectbase_custom($3)')
- _WRAP_VFUNC(Glib::RefPtr<Glib::ObjectBase> get_source_object(),
- "get_source_object")
-
- //TODO: is_tagged() vfunc when we can break ABI.
+ _WRAP_VFUNC(Glib::RefPtr<Glib::ObjectBase> get_source_object(), "get_source_object")
+ _WRAP_VFUNC(bool is_tagged(gpointer source_tag), "is_tagged")
};
} // namespace Gio
-
diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs
index 116b003..f8c94da 100644
--- a/gio/src/gio_vfuncs.defs
+++ b/gio/src/gio_vfuncs.defs
@@ -359,6 +359,14 @@
(return-type "GObject*")
)
+(define-vfunc is_tagged
+ (of-object "GAsyncResult")
+ (return-type "gboolean")
+ (parameters
+ '("gpointer" "source_tag")
+ )
+)
+
; GBufferedInputStream
(define-vfunc fill
diff --git a/glib/src/checksum.hg b/glib/src/checksum.hg
index 26770dd..b3a5555 100644
--- a/glib/src/checksum.hg
+++ b/glib/src/checksum.hg
@@ -61,9 +61,7 @@ public:
_WRAP_METHOD(void reset(), g_checksum_reset)
- //TODO: length should really be gssize, not gsize, when we can break ABI:
-#m4 _CONVERSION(`gsize',`gssize',`(gssize)($3)')
- _WRAP_METHOD(void update(const guchar* data, gsize length), g_checksum_update)
+ _WRAP_METHOD(void update(const guchar* data, gssize length), g_checksum_update)
/** Feeds data into an existing Checksum.
* The checksum must still be open, that is get_string() or get_digest() must not have been called on the
checksum.
@@ -99,4 +97,3 @@ public:
};
} //namespace Glib
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]