var this_type = get_data_type_for_symbol (t);
generate_type_declaration (this_type, decl_space);
var cselfparam = new CCodeParameter ("self", get_ccode_name (this_type));
- if (t is Struct) {
+ if (t is Struct && !((Struct) t).is_simple_type ()) {
cselfparam.type_name += "*";
}
var this_type = get_data_type_for_symbol (t);
var cselfparam = new CCodeParameter ("self", get_ccode_name (this_type));
- if (t is Struct) {
+ if (t is Struct && !((Struct) t).is_simple_type ()) {
cselfparam.type_name += "*";
}
CCodeParameter cvalueparam;
var ccall = new CCodeFunctionCall (new CCodeIdentifier (getter_cname));
if (prop.binding == MemberBinding.INSTANCE) {
- if (prop.parent_symbol is Struct) {
+ if (prop.parent_symbol is Struct && !((Struct) prop.parent_symbol).is_simple_type ()) {
// we need to pass struct instance by reference
var instance = expr.inner.target_value;
if (!get_lvalue (instance)) {