After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730873 - miniobject: Add missing (nullable) annotations
miniobject: Add missing (nullable) annotations
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.3.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-28 09:18 UTC by Philip Withnall
Modified: 2014-06-28 08:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstminiobject: Add missing (nullable) annotations (1.34 KB, patch)
2014-05-28 09:18 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-05-28 09:18:44 UTC
Patch attached
Comment 1 Philip Withnall 2014-05-28 09:18:46 UTC
Created attachment 277367 [details] [review]
gstminiobject: Add missing (nullable) annotations

gst_mini_object_replace() can take NULL mini-objects.
Comment 2 Sebastian Dröge (slomo) 2014-05-28 09:32:10 UTC
nullable requires a gobject-introspection version we don't (want to) depend on yet.
Comment 3 Sebastian Dröge (slomo) 2014-05-28 09:33:07 UTC
Also needs to be done for all other _replace functions
Comment 4 Philip Withnall 2014-05-28 09:51:34 UTC
(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?
Comment 5 Sebastian Dröge (slomo) 2014-05-28 10:00:47 UTC
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
Comment 6 Evan Nemerson 2014-05-29 22:14:41 UTC
(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).
Comment 7 Sebastian Dröge (slomo) 2014-06-26 17:17:14 UTC
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