private string lower_case_cprefix;
private string lower_case_csuffix;
private bool? boolean_type;
- private bool integer_type;
+ private bool? integer_type;
private bool floating_type;
private bool decimal_floating_type;
private bool? simple_type;
* @return true if this is an integer type, false otherwise
*/
public bool is_integer_type () {
- if (base_type != null) {
- var st = base_struct;
- if (st != null && st.is_integer_type ()) {
- return true;
- }
+ var st = base_struct;
+ if (st != null && st.is_integer_type ()) {
+ return true;
+ }
+ if (integer_type == null) {
+ integer_type = get_attribute ("IntegerType") != null;
}
return integer_type;
}
}
private void process_integer_type_attribute (Attribute a) {
- integer_type = true;
if (a.has_argument ("rank")) {
rank = a.get_integer ("rank");
}
if (CodeContext.get ().profile == Profile.DOVA) {
if (is_boolean_type ()) {
return "false";
- } else if (integer_type || floating_type) {
+ } else if (is_integer_type () || floating_type) {
return "0";
}
}