mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: Rewrite list_files() to avoid GHashTable/GPtrArray
This changes its API and ABI: it now returns an allocated array of const strings, rather than an allocated array of allocated strings. The call sites in the source tree have been adjusted accordingly. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -64,9 +64,9 @@ main (gint argc,
|
||||
|
||||
if (list_files)
|
||||
{
|
||||
g_auto(GStrv) files = sysprof_capture_reader_list_files (reader);
|
||||
g_autofree const gchar **files = sysprof_capture_reader_list_files (reader);
|
||||
|
||||
for (guint i = 0; files[i]; i++)
|
||||
for (gsize i = 0; files[i]; i++)
|
||||
g_print ("%s\n", files[i]);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user