GNOME Bugzilla – Bug 729763
Add missing (nullable) annotations on return values
Last modified: 2015-11-08 13:50:46 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.
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?
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 ***