if (sym.source_reference != null) {
sym.source_reference.file.used = true;
}
+ if (sym.anonymous) {
+ return !decl_space.is_header && CodeContext.get ().use_header;
+ }
if (sym.external_package || (!decl_space.is_header && CodeContext.get ().use_header && !sym.is_internal_symbol ())) {
// add feature test macros
foreach (unowned string feature_test_macro in get_ccode_feature_test_macros (sym).split (",")) {
if (ModifierFlags.EXTERN in flags || scanner.source_file.file_type == SourceFileType.PACKAGE) {
d.external = true;
}
+ if (!d.get_attribute_bool ("CCode", "has_typedef", true)) {
+ if (!d.external) {
+ Report.error (get_last_src (), "Delegates without definition must be external");
+ }
+ d.anonymous = true;
+ }
foreach (TypeParameter type_param in type_param_list) {
d.add_type_parameter (type_param);
}
*/
public bool used { get; set; }
+ /**
+ * Specifies whether this symbol is anonymous and has no public defintion.
+ */
+ public bool anonymous { get; set; }
+
/**
* Specifies the accessibility of this symbol. Public accessibility
* doesn't limit access. Default accessibility limits access to this
"CCode", "type_signature", "default_value", "set_value_function", "type_id", "cprefix", "cheader_filename",
"marshaller_type_name", "get_value_function", "cname", "destroy_function", "lvalue_access",
"has_type_id", "instance_pos", "const_cname", "take_value_function", "copy_function", "free_function",
- "param_spec_function", "has_target", "type_cname", "ref_function", "ref_function_void", "unref_function", "type",
+ "param_spec_function", "has_target", "has_typedef", "type_cname", "ref_function", "ref_function_void", "unref_function", "type",
"has_construct_function", "returns_floating_reference", "gir_namespace", "gir_version", "construct_function",
"lower_case_cprefix", "simple_generics", "sentinel", "scope", "has_destroy_function", "ordering", "type_check_function",
"has_copy_function", "lower_case_csuffix", "ref_sink_function", "dup_function", "finish_function", "generic_type_pos",