Add "c:identifier" attribute to GIrNodeValue (for flags and enum values). GOBJECT_INTROSPECTION_0_10_3
authorLaszlo Pandy <lpandy@src.gnome.org>
Tue, 22 Feb 2011 15:02:12 +0000 (16:02 +0100)
committerLaszlo Pandy <lpandy@src.gnome.org>
Wed, 23 Feb 2011 12:55:04 +0000 (13:55 +0100)
commited94a687d874c655386bcef662eb659aaca83ac5
tree3fb3e3ba5ac424cb81ccf9ea49c1dc92fca8eea5
parent3fe4ad82003a5472c44585627f86e5883772acca
Add "c:identifier" attribute to GIrNodeValue (for flags and enum values).

Flags and enums with a GType have a value_nick and value_name
strings available in the class struct. But for flags and enums
without GType, we need to get this information from introspection.

g_base_info_get_name() gives the string for value_nick. In the GIR,
the attribute "c:identifier" is the string neede for value_name.

This patch adds the "c:identifier" from GIR to the typelib for all
flags and enum values. It can be retireved using
g_base_info_get_attribute(info, "c:identifier").

https://bugzilla.gnome.org/show_bug.cgi?id=642757
girepository/girparser.c
tests/repository/Makefile.am
tests/repository/gitypelibtest.c [new file with mode: 0644]