From e7bb7cb6075e162766b90b4cb24f26f0f80b4046 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Sat, 5 Jun 2010 09:45:50 +0200 Subject: [PATCH] dova: Prepare support for decimal floating point types --- vala/valastruct.vala | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/vala/valastruct.vala b/vala/valastruct.vala index addd2db09..b7af767fc 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -41,6 +41,7 @@ public class Vala.Struct : TypeSymbol { private bool boolean_type; private bool integer_type; private bool floating_type; + private bool decimal_floating_type; private int rank; private string marshaller_type_name; private string get_value_function; @@ -377,7 +378,17 @@ public class Vala.Struct : TypeSymbol { } return floating_type; } - + + public bool is_decimal_floating_type () { + if (base_type != null) { + var st = base_struct; + if (st != null && st.is_decimal_floating_type ()) { + return true; + } + } + return decimal_floating_type; + } + /** * Returns the rank of this integer or floating point type. * @@ -463,6 +474,9 @@ public class Vala.Struct : TypeSymbol { if (a.has_argument ("rank")) { rank = a.get_integer ("rank"); } + if (a.has_argument ("decimal")) { + decimal_floating_type = a.get_bool ("decimal"); + } if (a.has_argument ("width")) { width = a.get_integer ("width"); } -- 2.47.3