[Xfce4-commits] [xfce/thunar] 01/01: Proper fix for g_mem_is_system_malloc deprecation

noreply at xfce.org noreply at xfce.org
Tue Sep 12 05:18:16 CEST 2017


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit dfd7a6b820d3a1dd291b8da73ef34b2be99549d5
Author: Andre Miranda <andreldm at xfce.org>
Date:   Tue Sep 12 00:17:50 2017 -0300

    Proper fix for g_mem_is_system_malloc deprecation
---
 thunar/thunar-session-client.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-session-client.c b/thunar/thunar-session-client.c
index ff49b66..60728b5 100644
--- a/thunar/thunar-session-client.c
+++ b/thunar/thunar-session-client.c
@@ -173,7 +173,23 @@ thunar_session_client_connect (ThunarSessionClient *session_client,
   /* tell GDK about our new session id */
   gdk_x11_set_sm_client_id (id);
 
-  session_client->id = id;
+  /* remember the returned client id */
+#if GLIB_CHECK_VERSION (2, 46, 0)
+    /* just use the memory */
+    session_client->id = id;
+#else
+  if (g_mem_is_system_malloc ())
+    {
+      /* just use the memory */
+      session_client->id = id;
+    }
+  else
+    {
+      /* use GLib memory management */
+      session_client->id = g_strdup (id);
+      free (id);
+    }
+#endif
 
   /* determine the session file path */
   spec = g_strconcat ("sessions/Thunar-", session_client->id, NULL);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list