[glibmm] ActionGroup: list_actions_vfunc(): Do not return freed memory.



commit b40f9a7014fac162b3e76a4ee987e3d4801be96a
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 23 21:46:23 2012 +0100

    ActionGroup: list_actions_vfunc(): Do not return freed memory.
    
    * gio/src/actiongroup.hg: list_actions vfunc: Correct the conversion,
    doing a deep copy of the array of strings.

 ChangeLog              |    7 +++++++
 gio/src/actiongroup.hg |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f854e2c..7a611fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-03-23  Murray Cumming  <murrayc murrayc com>
 
+	ActionGroup: list_actions_vfunc(): Do not return freed memory.
+
+	* gio/src/actiongroup.hg: list_actions vfunc: Correct the conversion,
+	doing a deep copy of the array of strings.
+
+2012-03-23  Murray Cumming  <murrayc murrayc com>
+
 	gmmproc: _WRAP_SIGNAL(): Allow signals to be deprecated.
 
 	* tools/pm/WrapParser.pm: on_wrap_signal(): Parse an optional
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index e6c2fdd..4292caf 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -89,7 +89,7 @@ public:
 
   _WRAP_VFUNC(bool has_action(const Glib::ustring& name) const, "has_action")
 
-#m4 _CONVERSION(`std::vector<Glib::ustring>',`gchar**',`const_cast<gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data())')
+#m4 _CONVERSION(`std::vector<Glib::ustring>',`gchar**',`g_strdupv(const_cast<gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data()))')
   _WRAP_VFUNC(std::vector<Glib::ustring> list_actions() const, "list_actions")
 
   _WRAP_VFUNC(bool get_action_enabled(const Glib::ustring& name) const, "get_action_enabled")



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