Re: [Vala] Gda.DataModel.get_value_at C generated code is incorrect



On Mon, Oct 31, 2011 at 5:51 PM, Daniel Espinosa <esodan gmail com> wrote:

Thanks but (allow-none) annotation doesn't work on Returns:

I have added the following metadata:

DataModel.i_get_value_at unowned=true
DataModel.i_get_value_at nullable=true

That binds and compiles correctly :-)

I'll search any other API with the same problem.

Then Any return value that can return NULL must be nullable? If so I
need to add lot of metadata every where.

Do you consider is a GObject Introspection Bug that you can't mark a
return value as (allow-none)? Because even if you add that annotation
GIR generator ignores it.


It's tricky. If a method returns an int? (which is int* in C) it's not much
introspectable. For what concerns other structs, this can be special cased
in the vala parser. Feel free to report the relative bugs.

-- 
www.debian.org - The Universal Operating System


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