-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
|
||
#![allow(non_snake_case)] | ||
|
||
|
||
const Foo_Bar: Foo = Foo(2); | ||
const Foo_Baz: Foo = Foo(4); | ||
const Foo_Duplicated: Foo = Foo(4); | ||
const Foo_Negative: Foo = Foo(-3); | ||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | ||
pub struct Foo(pub i32); | ||
const Buz_Bar: Buz = Buz(2); | ||
const Buz_Baz: Buz = Buz(4); | ||
const Buz_Duplicated: Buz = Buz(4); | ||
const Buz_Negative: Buz = Buz(-3); | ||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | ||
pub struct Buz(pub i8); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// bindgen-flags: --bitfield-enum ".*" -- -std=c++11 | ||
|
||
enum Foo { | ||
Bar = 1 << 1, | ||
Baz = 1 << 2, | ||
Duplicated = 1 << 2, | ||
Negative = -3, | ||
}; | ||
|
||
enum class Buz : signed char { | ||
Bar = 1 << 1, | ||
Baz = 1 << 2, | ||
Duplicated = 1 << 2, | ||
Negative = -3, | ||
}; |