g_option_context_add_main_entries() is missing array annotation for entries parameter
The entries
argument of g_option_context_add_main_entries()
is supposed to be a pointer to a NULL-terminated array of GOptionEntry
structs, but from the C signature function alone one can't distinguish between its being an array or a single item. I think it needs to be annotated with (array zero-terminated=1)
.
The current version results in auto-generated bindings being incorrect in some languages eg Typescript bindings generated by ts-for-gjs. This might also result in undefined behaviour if one tried to use the function in a weakly typed language like javascript or python?
There could be a lot of other functions in GLib with this problem.