instance_struct.add_field ("volatile int", "ref_count");
}
+ if (context.abi_stability) {
+ // add "/*< public >*/" separator
+ instance_struct.add_comment ("< public >");
+ }
+
if (is_gtypeinstance) {
decl_space.add_type_declaration (new CCodeTypeDefinition ("struct %sPrivate".printf (instance_struct.name), new CCodeVariableDeclarator ("%sPrivate".printf (get_ccode_name (cl)))));
type_struct.add_field ("%sClass".printf (get_ccode_name (cl.base_class)), "parent_class");
}
+ if (context.abi_stability) {
+ // add "/*< public >*/" separator
+ type_struct.add_comment ("< public >");
+ }
+
if (is_fundamental) {
type_struct.add_field ("void", "(*finalize) (%s *self)".printf (get_ccode_name (cl)));
}
}
}
+ if (context.abi_stability) {
+ // add "/*< private >*/" separator
+ instance_struct.add_comment ("< private >");
+ type_struct.add_comment ("< private >");
+ }
+
if (cl.is_compact && cl.base_class == null && !has_struct_member) {
// add dummy member, C doesn't allow empty structs
instance_struct.add_field ("int", "dummy");
type_struct.add_field ("GTypeInterface", "parent_iface");
+ if (context.abi_stability) {
+ // add "/*< public >*/" separator
+ type_struct.add_comment ("< public >");
+ }
+
if (iface.get_attribute ("GenericAccessors") != null) {
foreach (TypeParameter p in iface.get_type_parameters ()) {
string method_name = "get_%s_type".printf (p.name.down ());
}
}
+ if (context.abi_stability) {
+ // add "/*< private >*/" separator
+ type_struct.add_comment ("< private >");
+ }
+
decl_space.add_type_definition (type_struct);
var type_fun = new InterfaceRegisterFunction (iface);