[geany/geany-plugins] e97043: debugger: Don't use deprecated functions

Colomban Wendling git-noreply at xxxxx
Fri Jun 8 16:37:19 UTC 2012


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Fri, 08 Jun 2012 16:37:19
Commit:      e970439d0c38ee33889fc035346bdb7fe07e0612
             https://github.com/geany/geany-plugins/commit/e970439d0c38ee33889fc035346bdb7fe07e0612

Log Message:
-----------
debugger: Don't use deprecated functions


Modified Paths:
--------------
    debugger/src/bptree.c
    debugger/src/stree.c

Modified: debugger/src/bptree.c
3 files changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -199,8 +199,9 @@ static void on_render_filename(GtkTreeViewColumn *tree_column, GtkCellRenderer *
 	}
 	else
 	{
-		const gchar *name = g_basename(path);
+		gchar *name = g_path_get_basename(path);
 		g_object_set(cell, "text", name ? name : path, NULL);
+		g_free(name);
 	}
 	
 	if (path)


Modified: debugger/src/stree.c
6 files changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -185,13 +185,13 @@ static void on_render_filename(GtkTreeViewColumn *tree_column, GtkCellRenderer *
 	
 	if (1 != gtk_tree_path_get_depth(tpath))
 	{
-		const gchar *name;
-		gchar *path = NULL;
+		gchar *path = NULL, *name;
 		gtk_tree_model_get(model, iter, S_FILEPATH, &path, -1);
 
-		name = path ? g_basename(path) : NULL;
+		name = path ? g_path_get_basename(path) : NULL;
 		g_object_set(cell, "text", name ? name : path, NULL);
 
+		g_free(name);
 		if (path)
 		{
 			g_free(path);


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Plugins-Commits mailing list