Skip to content

glib-2.0: fix binding of g_strfreev

Reuben Thomas requested to merge rrt/vala:fix-strfreev into main

This binding was introduced by commit b6a42872. The commit log says:

gio-unix-2.0: Fix g_desktop_app_info_search binding

Add binding for g_strfreev in addition for conveniently free'ing the
returned array elements.

It seems that there was some confusion about the types. g_strfreev takes a char **: it frees an array of strings. But the binding strfreev takes a string **, that is, an array of array of strings. This commit fixes that.

I believe this confusion arose because g_desktop_app_info_search returns a char ***, that is, string **. Its binding appears to be incorrect too, as it is bound to return string **[], when it should presumably be string ** or string *[]. I have not attempted to fix this other binding.

Merge request reports