Re: [Vala] Confusing issue with static struct method: too many arguments to function
- From: Al Thomas <astavale yahoo co uk>
- To: vala-list gnome org, Michael Murphy <michael system76 com>
- Subject: Re: [Vala] Confusing issue with static struct method: too many arguments to function
- Date: Mon, 22 Jan 2018 23:37:16 +0000 (UTC)
> On Monday, 22 January 2018, 22:00:19 GMT, Michael Murphy <michael system76 com> wrote: > I have the
following which is automatically generated by bindgen.
Would that be vala-gen-introspect ? That's a bit of an old tool. I'm not sure how well it fares, butmay be a
good starting point for a hand written bindings.
[CCode (has_type_id = false)]
public struct Sector {
public static Sector megabyte (uint64 value);
}
If this is a named initializer then you want:
public Sector.megabyte (uint64 value);
An initializer of a struct is similar to a constructor of an object.
distinst_sector_megabyte ((guint64) 512, &_tmp39_);
My working assumption would be the return value, Sector, has been converted to an outparameter. I've not
looked in to the reasoning for that.
Hope that helps,
Al
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]