From: Guillaume Poirier-Morency <guillaumepoiriermore...@gmail.com>
 Sent: Tuesday, 24 May 2016, 3:26
 Subject: Re: [Vala] Extended floating types
   
It's possible to declare these types if you need to use them.

https://wiki.gnome.org/Projects/Vala/Manual/Attributes#FloatingType_Att
ribute

    [CCode (has_type_id = false)]
    [FloatingType (decimal = false, rank = 12, width = 128]
    struct float128_t {}

Good idea! Probably better still:
[SimpleType]
[CCode (has_type_id = false)]
[FloatingType (decimal = false, rank = 12, width = 128]
public struct float128_t {}
I think the SimpleType tells Vala the usual struct syntax isn't needed.You may 
also need the cheader_filename in there as welll.
You could also play around with the name, e.g. use cname="float128_t"then call 
it:public struct float128 {}but maybe that should wait to see if it becomes 
bound in GLib first.
As an example, this is how double is bound to 
gdouble:https://git.gnome.org/browse/vala/tree/vapi/glib-2.0.vapi#n805



   
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to