summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/enum-typedef.h
blob: f345f4de271f21f6075599fdfb100728349c4362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
typedef short int16_t;

// `cbindgen` emits this C idiom as the translation of:
//
//     #[repr(i16)]
//     pub enum Enum {
//         Variant,
//     }
enum Enum {
  Variant,
};
typedef int16_t Enum;

// C is also fine with the typedef coming before the enum.
typedef int16_t TypedefFirst;
enum TypedefFirst {
  Variant2,
};