GObject Introspection nested pointer attributes

I am not a Gnome contributor, but GObject Introspection (especially the GIR format) seems potentially useful outside the scope of Gnome, and I am looking for existing cross language binding descriptions before minting yet another machine readable binding description.

I want to describe attributes on pointers to pointers.

From reading the docs, I believe most or all the things I need are supported with GIR for a single layer of pointers. In particular, specifying pointers are to a single object or multiple, if the pointers can be null, have a different param that is its array length, are const, etc. I also want to be able to treat return values the same way, with all the same features.

It is unclear to me if this is possible to use these parameters to describe the inner pointers (i.e. the second pointer in **SomeType). I also can’t tell if there’s some way to specify all pointer properties differently at each layer. Both such features would be useful for the API I am writing bindings for.

1 Like