Why are you using GArray? I'd prefer writing into a strv directly to save the extra allocation. It will also make the code much shorter:
unescaped_source_actions = g_new0 (gchar *, g_strv_length (source_actions) + 1);
for (i = 0; source_actions[i]; i++)
unescaped_source_actions[i] = unescape_action_name (source_actions[i]);
Please follow code style of the rest of the file: put space between function names and open paren and declare all variables at the beginning of a scope.
Good catch. Thanks for the patch!
Why are you using GArray? I'd prefer writing into a strv directly to save the extra allocation. It will also make the code much shorter:
unescaped_ source_ actions = g_new0 (gchar *, g_strv_length (source_actions) + 1); source_ actions[ i] = unescape_ action_ name (source_ actions[ i]);
for (i = 0; source_actions[i]; i++)
unescaped_
Please follow code style of the rest of the file: put space between function names and open paren and declare all variables at the beginning of a scope.