mirror of
https://github.com/flatpak/flatpak.git
synced 2026-07-05 05:37:10 -04:00
Export a column helper
Make the find_column function public so we can use it in more places. Closes: #2409 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
e843f63804
commit
64b2bb33b1
@@ -797,7 +797,7 @@ get_permission_tables (XdpDbusPermissionStore *store)
|
||||
|
||||
/*** column handling ***/
|
||||
|
||||
static int
|
||||
int
|
||||
find_column (Column *columns,
|
||||
const char *name,
|
||||
GError **error)
|
||||
@@ -846,7 +846,7 @@ column_filter (Column *columns,
|
||||
for (i = 0; i < n_cols; i++)
|
||||
{
|
||||
int idx = find_column (columns, cols[i], error);
|
||||
if (idx == -1)
|
||||
if (idx < 0)
|
||||
return FALSE;
|
||||
result[i] = columns[idx];
|
||||
}
|
||||
|
||||
@@ -119,6 +119,9 @@ typedef struct {
|
||||
gboolean def;
|
||||
} Column;
|
||||
|
||||
int find_column (Column *columns,
|
||||
const char *name,
|
||||
GError **error);
|
||||
char *column_help (Column *columns);
|
||||
Column *handle_column_args (Column *all_columns,
|
||||
gboolean opt_show_all,
|
||||
|
||||
Reference in New Issue
Block a user