[glibmm] Gio::ActionMap: Fix a reference-counting problem.



commit b30caa62a984547037f0e35affdbaf6299cedb61
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 26 21:56:06 2013 +0200

    Gio::ActionMap: Fix a reference-counting problem.
    
    * gio/src/actionmap.hg: add_action_vfunc(): Add a custom _CONVERSION()
      that takes a reference, just for this vfunc. We would have
      seen the need for this before if it had used a const & instead
      of passing the RefPtr by value, which we probaby cannot change
      now without breaking ABI.

 gio/src/actionmap.hg |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/src/actionmap.hg b/gio/src/actionmap.hg
index f371167..8d17aeb 100644
--- a/gio/src/actionmap.hg
+++ b/gio/src/actionmap.hg
@@ -190,6 +190,7 @@ public:
   _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.
+#m4 _CONVERSION(`GAction*', `Glib::RefPtr<Action>', `Glib::wrap($3, true)')
   _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]