[glibmm] convert_glib.m4: Remove _CONVERSIONs that can cause memory leaks



commit 134d5d4ff1117e0c81d88b4af1a4358e4bbdf072
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Mon Jun 26 17:04:55 2017 +0200

    convert_glib.m4: Remove _CONVERSIONs that can cause memory leaks
    
    Converting from a non-const gchar* to Glib::ustring or std::string without
    calling g_free() has caused memory leaks in several signals and vfuncs.
    Remove these conversions from convert_glib.m4. Correct conversions can be
    added in .hg files where they are needed, and where it's known what is correct.
    Bug 783360

 tools/m4/convert_glib.m4 |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/tools/m4/convert_glib.m4 b/tools/m4/convert_glib.m4
index 4871482..8d32659 100644
--- a/tools/m4/convert_glib.m4
+++ b/tools/m4/convert_glib.m4
@@ -90,7 +90,6 @@ _CONVERSION(`const Glib::ustring&', `const guchar*', `(($2)$3.c_str())')
 _CONVERSION(`const std::string&',`const char*',`$3.c_str()')
 _CONVERSION(`std::string',`const char*',`$3.c_str()')
 _CONVERSION(`const Glib::ustring&',`gchar*',`const_cast<gchar*>($3.c_str())')
-_CONVERSION(`gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
 _CONVERSION(`const-gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
 _CONVERSION(`const-guchar*',`Glib::ustring',__GCHARP_TO_USTRING)
 _CONVERSION(`const gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
@@ -100,7 +99,6 @@ _CONVERSION(`const char*',`std::string',__GCHARP_TO_STDSTRING)
 _CONVERSION(`const char*',`const-gchar*',`$3')
 _CONVERSION(`const-gchar*',`const char*',`$3')
 _CONVERSION(`const char*',`const std::string&',__GCHARP_TO_STDSTRING)
-_CONVERSION(`char*',`std::string',__GCHARP_TO_STDSTRING)
 _CONVERSION(`std::string', `char*', `g_strdup(($3).c_str())')
 _CONVERSION(`const std::string&', `char*', `g_strdup(($3).c_str())')
 _CONVERSION(`Glib::ustring', `char*', `g_strdup(($3).c_str())')


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