push_node (element_get_name (), true);
Struct st;
+ bool require_copy_free = false;
if (current.new_symbol) {
st = new Struct (element_get_name (), current.source_reference);
current.symbol = st;
}
set_type_id_ccode (st);
+ require_copy_free = st.has_attribute_argument ("CCode", "type_id");
st.external = true;
st.access = SymbolAccessibility.PUBLIC;
pop_metadata ();
}
+ // Add default g_boxed_copy/free ccode-attributes
+ if (require_copy_free) {
+ st.set_attribute_string ("CCode", "copy_function", "g_boxed_copy");
+ st.set_attribute_string ("CCode", "free_function", "g_boxed_free");
+ }
+
pop_node ();
end_element ("record");
}