summaryrefslogtreecommitdiff
path: root/tests/scanner/annotation.h
diff options
context:
space:
mode:
authorAndreas Rottmann <a.rottmann@gmx.at>2010-12-07 00:18:15 +0100
committerAndreas Rottmann <a.rottmann@gmx.at>2010-12-07 00:18:15 +0100
commitd85dbebee2c565a911c79dd199f0e70020f2918a (patch)
tree8e6c4f829c61b6d40647a53f1ed31bf2a81b1a81 /tests/scanner/annotation.h
parentf135e6f2f81e9dd52385cb1449779ef420c950c3 (diff)
downloadgobject-introspection-d85dbebee2c565a911c79dd199f0e70020f2918a.tar.gz
Support glib-mkenums comment /*< flags >*/
- Modify the lexer to consider all "trigraph" comments specially, and parse them for "flags" as well as "private" and "public" (which were previously hardcoded). This change allows for future support of multiple annotations inside a single trigraph comment. - Change the parser to consider the additional field "flags" set by the lexer when constructing enums. - Add a test case for the "flags" trigraph comment to the scanner annotation tests. See <https://bugzilla.gnome.org/show_bug.cgi?id=631530>.
Diffstat (limited to 'tests/scanner/annotation.h')
-rw-r--r--tests/scanner/annotation.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h
index e315af5b..b58aa814 100644
--- a/tests/scanner/annotation.h
+++ b/tests/scanner/annotation.h
@@ -3,6 +3,12 @@
#include <glib-object.h>
+typedef enum /*< flags,prefix=ANN >*/
+{
+ ANN_FLAG_FOO = 1,
+ ANN_FLAG_BAR = 2
+} AnnotationBitfield;
+
/**
* AnnotationCallback:
* @in: (in) (transfer none): array of ints