summaryrefslogtreecommitdiff
path: root/tests/headers/anon-fields-prefix.h
diff options
context:
space:
mode:
authorVarphone Wong <varphone@qq.com>2019-10-31 23:32:45 +0800
committerEmilio Cobos Álvarez <emilio@crisal.io>2020-08-04 12:08:11 +0200
commitdfeff8992e7726965c437697305379c7128a3812 (patch)
tree4e3829d52aaf5b173e62ebf16910f2541ca4faae /tests/headers/anon-fields-prefix.h
parent87b2bc033f35234d292d41ee2ba165516345dd18 (diff)
Add --anon-fields-prefix option
Allow to use the given prefix for the anon fields instead of `__bindgen_anon_`.
Diffstat (limited to 'tests/headers/anon-fields-prefix.h')
-rw-r--r--tests/headers/anon-fields-prefix.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/headers/anon-fields-prefix.h b/tests/headers/anon-fields-prefix.h
new file mode 100644
index 00000000..8dcae0c6
--- /dev/null
+++ b/tests/headers/anon-fields-prefix.h
@@ -0,0 +1,15 @@
+// bindgen-flags: --anon-fields-prefix "u"
+
+union color {
+ struct {
+ unsigned char r;
+ unsigned char g;
+ unsigned char b;
+ };
+ struct {
+ unsigned char y;
+ unsigned char u;
+ unsigned char v;
+ };
+ unsigned char v3[3];
+};