mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-03 22:59:39 +02:00
girepository: Split arguments of gi_repository_dump()
Accepting two filenames as a string comma-separated string seems like a layering violation: this is a public API which could be used in places other than directly off a set of command line arguments. Move the command line argument parsing to the command line callback. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3155
This commit is contained in:
@@ -1740,8 +1740,11 @@ gi_repository_introspect_cb (const char *option_name,
|
||||
GError **error)
|
||||
{
|
||||
GError *tmp_error = NULL;
|
||||
gboolean ret = gi_repository_dump (value, &tmp_error);
|
||||
if (!ret)
|
||||
char **args;
|
||||
|
||||
args = g_strsplit (value, ",", 2);
|
||||
|
||||
if (!gi_repository_dump (args[0], args[1], &tmp_error))
|
||||
{
|
||||
g_error ("Failed to extract GType data: %s",
|
||||
tmp_error->message);
|
||||
|
Reference in New Issue
Block a user