[atkmm/atkmm-2-24] Text: Fix memory leaks in vfuncs



commit 228fcc96a46690f34e92b805867b509ee036f6b6
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Jun 27 17:15:14 2017 +0200

    Text: Fix memory leaks in vfuncs
    
    get_text_vfunc(), get_text_after_offset_vfunc(), get_text_at_offset_vfunc(),
    get_text_before_offset_vfunc() and get_selection_vfunc() shall delete
    the returned character array after it has been copied to a Glib::ustring.
    Bug 783360

 atk/src/text.hg |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/atk/src/text.hg b/atk/src/text.hg
index 28730f1..8bdd100 100644
--- a/atk/src/text.hg
+++ b/atk/src/text.hg
@@ -173,7 +173,7 @@ public:
 
 protected:
 #m4 _CONVERSION(`Glib::ustring', `gchar*', `g_strdup(($3).c_str())')
-
+#m4 _CONVERSION(`gchar*', `Glib::ustring', `Glib::convert_return_gchar_ptr_to_ustring($3)')
   _WRAP_VFUNC(Glib::ustring get_text(int start_offset, int end_offset) const, get_text)
   _WRAP_VFUNC(gunichar get_character_at_offset(int offset) const, get_character_at_offset)
 


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