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 729763 - Add missing (nullable) annotations on return values
Add missing (nullable) annotations on return values
Status: RESOLVED DUPLICATE of bug 753520
Product: clutter
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: 729745
 
 
Reported: 2014-05-08 03:48 UTC by Evan Nemerson
Modified: 2015-11-08 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
introspection: add many missing (nullable) return value annotations (38.64 KB, patch)
2014-05-08 03:48 UTC, Evan Nemerson
none Details | Review

Description Evan Nemerson 2014-05-08 03:48:44 UTC
Created attachment 276117 [details] [review]
introspection: add many missing (nullable) return value annotations

Now that bug #660879 has been fixed, I'm trying to go through and add the missing annotations.

Most of these are just from looking for mentions of %NULL in Returns value:, a couple are ported from the Vala bindings.  I'm sure I missed some (and I didn't even look in the deprecated folder), but this should be a good start.
Comment 1 Jonas Platte 2015-11-08 13:32:24 UTC
This seems to be a big problem in gtk+ as well. Just checking a few functions that return pointers, none of the ones that could return null actually had the nullable annotation. I did find a counter-example, but there are a lot that don't have the annotation.

This is a big problem for haskell-gi, where a nullable pointer and a non-nullable pointer are treated as disparate types. I think it would be the most reasonable approach to try to fix all these at once, so bindings are only broken once. Or will the likely be delayed until the next major versions of all the affected packages?
Comment 2 Emmanuele Bassi (:ebassi) 2015-11-08 13:50:46 UTC
Alberto has been working on an automated script that checks all the entry points that could be marked as nullable. We should start from there — also because reviewing a large patch is a surefire way to guarantee we gloss over something.

Let's mark this a duplicate — even though Evan attached a patch here.

*** This bug has been marked as a duplicate of bug 753520 ***