Re: [Vala] [PATCH] GIO nullable parameters



* Frederik wrote, On 20/05/08 14:01:
Jürg Billeter wrote:
On Tue, 2008-05-13 at 12:09 +0200, Frederik wrote:
I think in the GIO vapi bindings there are more parameters that should
be marked as nullable. For example: "etag" as in File.replace() or
"progress_callback" as in File.move().

Yes, we certainly still miss a lot of nullable annotations.

I've been looking at the GIO documentation and spotted all nullable
parameters. I have attached a patch for gio-2.0.metadata inclusive the
newly generated vapi. This should cover all nullable parameters in GIO.
I think it may be simpler to allow the null-able clue to be part of the
C source using a macro indicator which can be compiled away in C.

#ifndef VALA
#define NULL_OK
#endif
...

send_to_mainloop_async (GLib.SourceFunc func, NULL_OK GLib.DestroyNotify notify);

...

It enrichens the C source and allows the C maintainer to keep the hint
alive effortlessly, rather than someone have to keep a meta file in sync.

Sam






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