Re: [Vala] extern function prototype gets rearranged



Hello,

                  في ج، 15-04-2011 عند 22:34 +0100 ، كتب Sam Thursfield:
Hi!
I've encountered a weird bug/feature which is breaking everything.
[...]
compile this, and you'll see test_value_get_date() is declared in the
C code like this:

void test_value_get_date (TestValue *self, GDate* result);

However, it's extern for a reason, and the C function prototype is to
return a GDate *, not ... whatever this function is doing.

Then, you should declare it as returning GLib.Date?

You may also question the fact that it is declared as a struct in the
vapi and not as a compact class, but I think it would be easier to just
declare your function to return GLib.Date?

HTH,
Abderrahim




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