Commit c0d3a4fd authored by Jürg Billeter's avatar Jürg Billeter

codegen: Generate struct copy and destroy functions only if needed

parent 4fadac9d
......@@ -154,7 +154,11 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
generate_struct_declaration (st, internal_header_file);
}
begin_struct_destroy_function (st);
if (context.profile == Profile.GOBJECT && !st.is_boolean_type () && !st.is_integer_type () && !st.is_floating_type ()) {
if (st.is_disposable ()) {
begin_struct_destroy_function (st);
}
}
st.accept_children (this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment