summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2017-06-26 17:04:55 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2017-06-26 17:04:55 +0200
commit134d5d4ff1117e0c81d88b4af1a4358e4bbdf072 (patch)
tree28b314fe52f15cfab313c72ca516a9393f404047
parent88a6ad60884be29a2224f3d50312d348bc78e753 (diff)
downloadglibmm-134d5d4ff1117e0c81d88b4af1a4358e4bbdf072.tar.gz
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
-rw-r--r--tools/m4/convert_glib.m42
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/m4/convert_glib.m4 b/tools/m4/convert_glib.m4
index 4871482d..8d326598 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())')