Re: [Vala] Extended floating types
- From: Al Thomas <astavale yahoo co uk>
- To: ben <iofelben gmail com>, "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] Extended floating types
- Date: Tue, 24 May 2016 15:13:24 +0000 (UTC)
From: ben <iofelben gmail com>
Sent: Tuesday, 24 May 2016, 16:01
Subject: Re: [Vala] Extended floating types
This does not work. The C code has: typedef float float128_t;
Try:
[SimpleType][CCode(has_type_id = false, default_value = "0")]public struct float128_t {}
The SimplyType makes it be passed by value rather than by reference when usedas an argument in a function
call.I think the FloatingType, IntegerType, etc. does casting. As there is norank 12 it just casts to the
default, i.e. float.
On the subject of binding exotic types. Bindings for C decimal typeswould be useful for financial data and
transactions.
On Mon, 2016-05-23 at 21:26 -0500, Guillaume Poirier-Morency wrote:
It's possible to declare these types if you need to use them.
https://wiki.gnome.org/Projects/Vala/Manual/Attributes#FloatingType_A
tt
ribute
[CCode (has_type_id = false)]
[FloatingType (decimal = false, rank = 12, width = 128]
struct float128_t {}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]