Incorrect anchor generated for GBoxed typedef in the same file as a class
@pwithnall
Submitted by Philip Withnall Link to original bug (#682401)
Description
If a single C file/H file pair defines a GObject class as normal, but also has a typedef of a struct which is registered as a GBoxed type with GObject, an extraneous <anchor>
element will be generated for the typedef in the gtk-doc XML for that file. It’s extraneous because a <refsect>
will also be generated for the typedef, with the same ID. The IDs will clash.
For example, the following H file (full version here: http://git.gnome.org/browse/totem-pl-parser/tree/plparse/totem-pl-parser.h):
typedef struct { … } TotemPlParserClass;
/**
- TotemPlParserMetadata:
- … */ typedef GHashTable TotemPlParserMetadata;
with the following C file (full version here: http://git.gnome.org/browse/totem-pl-parser/tree/plparse/totem-pl-parser.c):
GType totem_pl_parser_metadata_get_type (void) { … GType g_define_type_id = g_boxed_type_register_static ( g_intern_static_string ("TotemPlParserMetadata"), (GBoxedCopyFunc) g_hash_table_ref, (GBoxedFreeFunc) g_hash_table_unref); … }
will generate the following XML:
Synopsis`` `` #include <totem-pl-parser.h> … `` ``TotemPlParserMetadata`` ````TotemPlParserMetadata```` ``typedef GHashTable TotemPlParserMetadata; `` ``