rsvg_handle_get_geometry_sub() incorrect signature in Vala
https://valadoc.org/librsvg-2.0/Rsvg.Handle.get_geometry_sub.html
The signature is the following:
public bool get_geometry_sub (out Rectangle? ink_rect, out Rectangle? logical_rect, string? id)
The problem is that out
and ?
both signify a pointer, so the rectangle parameters translate to RsvgRectangle **
instead of RsvgRectangle *
, which leads to wrong C code generation:
Rsvg.Handle handle = new Rsvg.Handle ();
Rsvg.Rectangle rect;
handle.get_geometry_sub (null, out rect, null);
translates to
RsvgHandle* handle = NULL;
RsvgHandle* _tmp0_;
RsvgRectangle rect = {0};
RsvgRectangle* _tmp1_ = NULL;
#line 2 "../../../../../../../../../Projects/rsvgtest/src/main.vala"
_tmp0_ = rsvg_handle_new ();
#line 2 "../../../../../../../../../Projects/rsvgtest/src/main.vala"
handle = _tmp0_;
#line 4 "../../../../../../../../../Projects/rsvgtest/src/main.vala"
rsvg_handle_get_geometry_sub (handle, NULL, &_tmp1_, NULL);
#line 4 "../../../../../../../../../Projects/rsvgtest/src/main.vala"
rect = *_tmp1_;
Should the signature in vapi be
public bool get_geometry_sub (out Rectangle ink_rect, out Rectangle logical_rect, string? id)
instead?