[glibmm] ActionMap: lookup_action(): Fix the reference counting.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] ActionMap: lookup_action(): Fix the reference counting.
- Date: Mon, 16 Sep 2013 10:44:08 +0000 (UTC)
commit 8386162a88b70b4495b347895da8d1287b67bcc1
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 16 12:43:26 2013 +0200
ActionMap: lookup_action(): Fix the reference counting.
* gio/src/actionmap.hg: Use refreturn.
gio/src/actionmap.hg | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gio/src/actionmap.hg b/gio/src/actionmap.hg
index 6c8d1c5..f371167 100644
--- a/gio/src/actionmap.hg
+++ b/gio/src/actionmap.hg
@@ -52,8 +52,8 @@ class ActionMap : public Glib::Interface
_CLASS_INTERFACE(ActionMap, GActionMap, G_ACTION_MAP, GActionMapInterface)
public:
- _WRAP_METHOD(Glib::RefPtr<Action> lookup_action(const Glib::ustring& action_name),
g_action_map_lookup_action)
- _WRAP_METHOD(Glib::RefPtr<const Action> lookup_action(const Glib::ustring& action_name) const,
g_action_map_lookup_action, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Action> lookup_action(const Glib::ustring& action_name),
g_action_map_lookup_action, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Action> lookup_action(const Glib::ustring& action_name) const,
g_action_map_lookup_action, constversion, refreturn)
/** A Slot to be called when an action has been activated.
* See add_action_with_parameter().
@@ -189,6 +189,7 @@ public:
#m4 _CONVERSION(`Glib::RefPtr<Action>', `GAction*', `Glib::unwrap($3)')
_WRAP_VFUNC(Glib::RefPtr<Action> lookup_action(const Glib::ustring& name) const, "lookup_action")
+ //TODO: Change this to use const & when we can break ABI.
_WRAP_VFUNC(void add_action(Glib::RefPtr<Action> action) const, "add_action")
_WRAP_VFUNC(void remove_action(const Glib::ustring& name), "remove_action")
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]