GNOME Bugzilla – Bug 740186
Modernize vala bindings
Last modified: 2014-11-27 16:34:19 UTC
This is the updated bindings that allow me to build the TuneIn plugin from bug 740184.
Created attachment 290766 [details] [review] gir: add more annotations
Created attachment 290767 [details] [review] net: keep a reference on cancellable The caller may unref the cancellable, but the async should not crash
Created attachment 290768 [details] [review] vala: modernize bindings generation Use GIR and modern autotools helpers. This binding allows to build simple plugin, it hasn't been tested for applications.
Review of attachment 290766 [details] [review]: Can you split out the fixes to the grl-net and the fixes to the main library? (With the comments, that would be one commit for grl-net, and 2 for the main library) ::: src/grl-source.h @@ +134,3 @@ * @media: (transfer full): a data transfer object * @user_data: user data passed to grl_source_resolve() + * @error: (nullable): possible #GError generated at processing Those are really separate bugs, can you do this in 2 steps? (type uint) is clearly incorrect, remove it in one commit, add the (nullable) in a separate one?
Review of attachment 290767 [details] [review]: Please explain what bug this fixes in the subject line, rather than in the commit body. Looks fine otherwise.
Review of attachment 290768 [details] [review]: Globally, that looks fine to me, but I don't know enough about the "state of the art" vala bindings to comment on this. (I usually prefer vala to work "out-of-the-box" with the Gir bindings)
Created attachment 290847 [details] [review] core: define C include for GIR
Created attachment 290848 [details] [review] net: define C include for GIR
Created attachment 290849 [details] [review] core: remove wrong (type uint) annotations for errors For some reason, those annotations where added since daebdc455. Today GIR seems to deal with callbacks errors fine, so let's remove it
Created attachment 290850 [details] [review] core: annotate nullable error in callbacks Since those arguments are optional error given to callbacks, annotate them as nullable.
Created attachment 290851 [details] [review] net: add GIR annotations for grl_net_wc_request_finish() Annotate out arguments and the memory ownership.
Created attachment 290852 [details] [review] core: annotate ownership transfer of grl_registry_register_source() Do as the comment in the function says, "Take ownership of the source".
Review of attachment 290847 [details] [review]: Looks good.
Review of attachment 290848 [details] [review]: Yep.
Review of attachment 290849 [details] [review]: Yes.
Review of attachment 290850 [details] [review]: Looks good.
Review of attachment 290851 [details] [review]: Looks good.
Review of attachment 290852 [details] [review]: Sure.
What about vala bindings, I guess it is ok too?
(In reply to comment #19) > What about vala bindings, I guess it is ok too? Best for jasuarez to check them out, try and ping him on IRC.
Attachment 290852 [details] pushed as 9621ecd - core: annotate ownership transfer of grl_registry_register_source()
LGTM! Thanks Marc-Andre, the vala bindings really needed some love :)
Attachment 290768 [details] pushed as 689bf70 - vala: modernize bindings generation
I forgot to say you need git version of vapigen (0.26.0-45-ge97c9f5).