HELP: fixing nullable annotations for return values

Hello Gtk hackers,

During GUADEC I decided to revive a small effort I took a while ago. I wrote a script using the private GObject Introspection AST API to check if %NULL was mentioned in the documentation string of any return value in any way that indicated that such function/method was likely to miss the (nullable) introspection annotation.

I came up with a list of 143 functions that I'm trying to fix on a branch (wip/aruiz/nullable-annotations), the plan is to collect and review all the fixes there and then rebase/sqash into master eventually. I'm tracking the effort on bgo#753520 [0] and using this Google Spreadsheet[1].

Anyone interested in helping fixing any of the listed functions, just add your IRC nickname in the owner list in the spreadsheet[1] and push into that branch. I only ask of a few things before pushing:
- Check if (transfer none/full) applies
- Rename NULL or #NULL as %NULL if you have the chance.
- Check if the function is actually nullable, my script may be mislead by whatever is in the document.

If we have any clang hacker, it'll be great if we could tool this into the compiler to check at compile time if a given function can return NULL at some point. To have something like this integrated in Builder and gobject introspection would certainly prevent new APIs to suffer from this problem.

Any further feedback or help with this effort in other libraries would be greatly appreciated.


Alberto Ruiz

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]