GNOME Bugzilla – Bug 730873
miniobject: Add missing (nullable) annotations
Last modified: 2014-06-28 08:31:35 UTC
Patch attached
Created attachment 277367 [details] [review] gstminiobject: Add missing (nullable) annotations gst_mini_object_replace() can take NULL mini-objects.
nullable requires a gobject-introspection version we don't (want to) depend on yet.
Also needs to be done for all other _replace functions
(In reply to comment #2) > nullable requires a gobject-introspection version we don't (want to) depend on > yet. OK. We can't use (allow-none) here because there's an (out) parameter, and (allow-none) (out) is poorly defined. I'll commit and prepare a patch for the rest of the _replace functions after the freeze. When will the freeze end?
It's not a real freeze, just the best patch status I could found :) We could switch to the new g-i once it's in the latest releases of the popular distros I guess
(In reply to comment #2) > nullable requires a gobject-introspection version we don't (want to) depend on > yet. This patch doesn't remove any old annotations, so it shouldn't matter. g-ir-scanner will emit a harmless warning about an unknown annotation, but the GIR will not be any different. I submitted a similar patch to systemd for gudev a while back and there haven't been any problems. Replacing allow-none with nullable (or optional) should probably wait, but I don't see a reason not to go ahead with this patch (as well as mine from bug #730957).
Pushed a slightly different version with (allow-none) for the normal parameter. Will change that to (nullable) everywhere once we depend on new gobject-introspection. commit 9edef56efcffcd1deac2af45176296f9d49f6c4d Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Wed May 28 10:14:45 2014 +0100 miniobject: Add missing (nullable) annotations gst_mini_object_replace() can take NULL mini-objects. https://bugzilla.gnome.org/show_bug.cgi?id=730873