[gtkmm] convert_gdk.m4: Wrap GdkDragContext with take_copy==false



commit e9fe60ba73e5550aa8d944a9f44da1e0b7a4b93e
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Thu Jul 6 19:16:11 2017 +0200

    convert_gdk.m4: Wrap GdkDragContext with take_copy==false
    
    In gtkmm, these conversions are used only by Gdk::EventDND::get_context() and
    Gtk::Widget::drag_begin(). They both take a ref after calling wrap(), like
    other conversions to Glib::RefPtr<SomeClass> where the C code does not give
    the caller a ref. An extra copy by wrap() means memory leak.

 tools/m4/convert_gdk.m4 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 194c338..e9a3cef 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -248,6 +248,6 @@ _CONVERSION(`Gdk::EventKey&',`GdkEventKey*',`($3).gobj()')
 _CONVERSION(`Gdk::EventSequence*',`GdkEventSequence*',`reinterpret_cast<$2>($3)')
 _CONVERSION(`GdkEventSequence*',`Gdk::EventSequence*',`reinterpret_cast<$2>($3)')
 
-_CONVERSION(`GdkDragContext*',`Glib::RefPtr<DragContext>',Glib::wrap($3, true))
-_CONVERSION(`GdkDragContext*',`Glib::RefPtr<Gdk::DragContext>',Glib::wrap($3, true))
+_CONVERSION(`GdkDragContext*',`Glib::RefPtr<DragContext>',Glib::wrap($3))
+_CONVERSION(`GdkDragContext*',`Glib::RefPtr<Gdk::DragContext>',Glib::wrap($3))
 


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