GNOME Bugzilla – Bug 730957
Missing nullability annotations
Last modified: 2014-06-28 08:31:08 UTC
Created attachment 277484 [details] [review] introspection: add many missing nullability annotations Just the stuff I found based on grepping for %NULL, I'm sure it's not complete. Also, I'll do it again after I finish switching all the docs from NULL to %NULL, so please don't close this bug yet.
Created attachment 277495 [details] [review] introspection: add many missing nullability annotations Oops, attached the one for gst-rtsp-server by accident. This is the one for gstreamer core.
Created attachment 277509 [details] [review] introspection: add many missing nullability annotations Complete version—went through all the documentation looking for %NULL after the patch from bug #730961 was applied.
Created attachment 277519 [details] [review] introspection: add many missing nullability annotations As requested, version which includes both nullable/optional and allow-none annotations.
Created attachment 278292 [details] [review] introspection: add missing (nullable) annotations to return values Splitting this up to make it a bit more reviewer-friendly. Support for (nullable) was added to G-I at the same time as nullable return values. Previous versions of G-I will not mark return values as nullable, even when an (allow-none) annotation is present, so it is not necessary to add (allow-none) annotations for compatibility with older versions of G-I.
Created attachment 278293 [details] [review] introspection: add nullability annotations to out and inout params This one deals with out and inout params only, adding (nullable) and (allow-none) annotations where appropriate. (nullable) is only available in new G-I, but there was no equivalent in older versions, so the only fallout should be some harmless warnings from g-ir-scanner about an unknown annotation.
Created attachment 278294 [details] [review] introspection: add some missing allow-none annotations to in params This one is for in params which are missing allow-one annotations.
Review of attachment 278294 [details] [review]: ::: gst/gstmessage.c @@ +787,3 @@ * @src: (transfer none): The object originating the message. + * @structure: (transfer full) (allow-none): The structure for the + * message. The message will take ownership of the structure. While this technically allows NULL it is not really valid
commit fe192fe399bf5fb913938b1b70d9cbf198ede565 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Jun 26 19:02:06 2014 +0200 message: Application and element messages should not have NULL structures It does not make sense for them. commit 4088363aead586c3dbcd0400b7f959744e49ad37 Author: Evan Nemerson <evan@nemerson.com> Date: Wed Jun 11 16:19:01 2014 -0700 introspection: add some missing allow-none annotations to in params https://bugzilla.gnome.org/show_bug.cgi?id=730957 commit 5d80cf12ba095ab1957a8732d37e34a8b37551b9 Author: Evan Nemerson <evan@nemerson.com> Date: Wed Jun 11 16:06:19 2014 -0700 introspection: add nullability annotations to out and inout params https://bugzilla.gnome.org/show_bug.cgi?id=730957 commit 2759882379fb4fd91038be3ff35cc9180e231841 Author: Evan Nemerson <evan@nemerson.com> Date: Wed Jun 11 15:21:34 2014 -0700 introspection: add missing (nullable) annotations to return values Support for (nullable) was added to G-I at the same time as nullable return values. Previous versions of G-I will not mark return values as nullable, even when an (allow-none) annotation is present, so it is not necessary to add (allow-none) annotations for compatibility with older versions of G-I. https://bugzilla.gnome.org/show_bug.cgi?id=730957