Can't mark g_(ptr_)array_new* as constructor
g_array_new
, g_ptr_array_new
, g_ptr_array_new_full
, g_sequence_new
and so on are not recognized as constructors. In the GLib gtkdoc comments, the (constructor)
annotations aren't there, but GIR should recognize these using its usual heuristics. I tried adding the tags locally and they still show up as functions in the GIR file.
Another thing to note is that these functions all have the introspectable="0"
attribute (even though they're not marked with (skip)
). Probably, this is happening because they both contain a void*
field in their struct, which makes it impossible to deal with from a GIR point of view.
Normally this wouldn't an issue, since GIR-based bindings can't use them anyway (as they're not introspectable). However: with the advent of gi-docgen, we also distinguish between functions and ctors for C documentation. Functions like g_ptr_array_new
show up as regular functions, and it now looks like GArray/GPtrArray/GSequence don't have any proper constructors.