Re: [Vala] Confusing issue with static struct method: too many arguments to function



   > 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]