[gtkmm] Gtk::Actionable::get_action_target_value(): Fix ref count



commit 2dddc2524ca70a113b77cc72845ab988ee9a3ec0
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Mon Aug 31 14:56:33 2020 +0200

    Gtk::Actionable::get_action_target_value(): Fix ref count
    
    gtk_actionable_get_action_target_value() does not give the caller a ref.
    get_action_target_value_vfunc_callback() shall store a copy of the
    returned value. It shall not give the caller a ref.

 gtk/src/actionable.hg | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/actionable.hg b/gtk/src/actionable.hg
index 7c5a7630..edb109a5 100644
--- a/gtk/src/actionable.hg
+++ b/gtk/src/actionable.hg
@@ -56,9 +56,9 @@ public:
   _WRAP_METHOD(Glib::ustring get_action_name() const, gtk_actionable_get_action_name)
   _WRAP_METHOD(void set_action_name(const Glib::ustring& action_name), gtk_actionable_set_action_name)
 
+#m4 _CONVERSION(`GVariant*',`Glib::VariantBase',`Glib::wrap($3,true)')
   _WRAP_METHOD(Glib::VariantBase get_action_target_value(), gtk_actionable_get_action_target_value)
   _WRAP_METHOD(const Glib::VariantBase get_action_target_value() const, 
gtk_actionable_get_action_target_value, constversion)
-
   _WRAP_METHOD(void set_action_target_value(const Glib::VariantBase& target_value), 
gtk_actionable_set_action_target_value)
 
   _IGNORE(gtk_actionable_set_action_target) //gtk_actionable_set_action_target() is just a C convenience 
method.
@@ -74,11 +74,11 @@ protected:
 
   _WRAP_VFUNC(void set_action_name(const Glib::ustring& action_name), "set_action_name")
 
-#m4 _CONVERSION(`Glib::VariantBase',`GVariant*',`$3.gobj_copy()')
-  _WRAP_VFUNC(Glib::VariantBase get_action_target_value() const, "get_action_target_value")
+#m4 _CONVERSION(`Glib::VariantBase',`GVariant*',`$3.gobj()')
+  _WRAP_VFUNC(Glib::VariantBase get_action_target_value() const, "get_action_target_value", keep_return)
 
 #m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3,true)')
   _WRAP_VFUNC(void set_action_target_value(const Glib::VariantBase& action_target_value), 
"set_action_target_value")
 };
 
-} // namespace Gio
+} // namespace Gtk


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