How to create a GIRepository2::AttributeIter and call GIRepository2::BaseInfo::iterate_attributes in G::O::I

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create a GIRepository2::AttributeIter and call GIRepository2::BaseInfo::iterate_attributes in G::O::I

Robin Lee
Hi, I continue to play GIRepository with G::O::I.

And there is no "new" method in GIRepository2::AttributeIter, so I can't figure it out how to run GIRepository2::BaseInfo::iterate_attributes, which needs a GIRepository2::AttributeIter instance.

-robin

_______________________________________________
gtk-perl-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Reply | Threaded
Open this post in threaded view
|

Re: How to create a GIRepository2::AttributeIter and call GIRepository2::BaseInfo::iterate_attributes in G::O::I

Emmanuele Bassi
The GIRepository API is not wholly introspectable because it's
expected to be used by language bindings in its native C form, as the
bridge between a language's C API and GObject.

The iterators are meant to be used on the C stack, to avoid excessive
memory allocations.

Ciao,
 Emmanuele.


On 8 August 2017 at 17:32, Robin Lee <[hidden email]> wrote:

> Hi, I continue to play GIRepository with G::O::I.
>
> And there is no "new" method in GIRepository2::AttributeIter, so I can't
> figure it out how to run GIRepository2::BaseInfo::iterate_attributes, which
> needs a GIRepository2::AttributeIter instance.
>
> -robin
>
> _______________________________________________
> gtk-perl-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>



--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-perl-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-perl-list