vala does not handle G-I for which self can be nullable
@chergert
Submitted by Christian Hergert Link to original bug (#784676)
Description
Some C API for objects allow NULL for the interface functions to use a fallback implementation. Setting (nullable) for @self in that API causes incompatible signatures in interface implementations in Vala.
This should be safe, as by design, you can't ever jump into vala code with a NULL instance.
Example:
/**
* foo_do_something:
* @self: (nullable): A #Foo or %NULL
*
* Do something. If foo is %NULL, a fallback implementation
* is provided.
*/
void
foo_do_something (Foo *foo)
{
if (foo)
FOO_GET_IFACE (foo)->do_something (foo);
else
do_fallback ();
}