diff options
author | Andreas Rottmann <a.rottmann@gmx.at> | 2010-10-05 23:49:33 +0200 |
---|---|---|
committer | Andreas Rottmann <a.rottmann@gmx.at> | 2010-10-05 23:49:33 +0200 |
commit | d15e386c8e10dd6b645a444e29cc053100089a07 (patch) | |
tree | 295caab07108aecfc7d6c8b774b02cea4745b89b /tests/scanner | |
parent | 4b94812bbfff446ac7d1684d67607be6a7cab4ec (diff) | |
download | gobject-introspection-d15e386c8e10dd6b645a444e29cc053100089a07.tar.gz |
Apply `(type bitfield)' annotations for enums
Previously, such annotations would be ignored.
Diffstat (limited to 'tests/scanner')
-rw-r--r-- | tests/scanner/Annotation-1.0-expected.gir | 4 | ||||
-rw-r--r-- | tests/scanner/annotation.h | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir index 050d888b..92d4ff21 100644 --- a/tests/scanner/Annotation-1.0-expected.gir +++ b/tests/scanner/Annotation-1.0-expected.gir @@ -15,6 +15,10 @@ and/or use gtk-doc annotations. --> shared-library="libannotation.so" c:identifier-prefixes="Annotation" c:symbol-prefixes="annotation"> + <bitfield name="Bitfield" c:type="AnnotationBitfield"> + <member name="foo" value="1" c:identifier="ANNOTATION_FLAG_FOO"/> + <member name="bar" value="2" c:identifier="ANNOTATION_FLAG_BAR"/> + </bitfield> <callback name="Callback" c:type="AnnotationCallback"> <doc xml:whitespace="preserve">This is a callback.</doc> <return-value transfer-ownership="none"> diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h index ef05ddb2..9559e400 100644 --- a/tests/scanner/annotation.h +++ b/tests/scanner/annotation.h @@ -4,6 +4,15 @@ #include <glib-object.h> /** + * AnnotationBitfield: (type bitfield) + **/ +typedef enum +{ + ANNOTATION_FLAG_FOO = 1, + ANNOTATION_FLAG_BAR = 2 +} AnnotationBitfield; + +/** * AnnotationCallback: * @in: (in) (transfer none): array of ints * |