committed by
Emilio Cobos Álvarez
parent
770f352375
commit
5b418d968c
@@ -204,6 +204,27 @@ typedef struct Q {
|
||||
};
|
||||
} Q;
|
||||
|
||||
typedef enum R_Tag {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
} R_Tag;
|
||||
|
||||
typedef struct IRBar_Body {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
} IRBar_Body;
|
||||
|
||||
typedef struct R {
|
||||
R_Tag tag;
|
||||
union {
|
||||
struct {
|
||||
int16_t IRFoo;
|
||||
};
|
||||
IRBar_Body IRBar;
|
||||
};
|
||||
} R;
|
||||
|
||||
void root(struct Opaque *opaque,
|
||||
A a,
|
||||
B b,
|
||||
@@ -221,7 +242,8 @@ void root(struct Opaque *opaque,
|
||||
enum N n,
|
||||
O o,
|
||||
struct P p,
|
||||
struct Q q);
|
||||
struct Q q,
|
||||
struct R r);
|
||||
|
||||
#if 0
|
||||
''' '
|
||||
|
||||
@@ -270,6 +270,27 @@ typedef struct Q {
|
||||
};
|
||||
} Q;
|
||||
|
||||
typedef enum R_Tag {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
} R_Tag;
|
||||
|
||||
typedef struct IRBar_Body {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
} IRBar_Body;
|
||||
|
||||
typedef struct R {
|
||||
R_Tag tag;
|
||||
union {
|
||||
struct {
|
||||
int16_t IRFoo;
|
||||
};
|
||||
IRBar_Body IRBar;
|
||||
};
|
||||
} R;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
@@ -291,7 +312,8 @@ void root(struct Opaque *opaque,
|
||||
enum N n,
|
||||
O o,
|
||||
struct P p,
|
||||
struct Q q);
|
||||
struct Q q,
|
||||
struct R r);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@@ -204,6 +204,27 @@ typedef struct {
|
||||
};
|
||||
} Q;
|
||||
|
||||
typedef enum {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
} R_Tag;
|
||||
|
||||
typedef struct {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
} IRBar_Body;
|
||||
|
||||
typedef struct {
|
||||
R_Tag tag;
|
||||
union {
|
||||
struct {
|
||||
int16_t IRFoo;
|
||||
};
|
||||
IRBar_Body IRBar;
|
||||
};
|
||||
} R;
|
||||
|
||||
void root(Opaque *opaque,
|
||||
A a,
|
||||
B b,
|
||||
@@ -221,7 +242,8 @@ void root(Opaque *opaque,
|
||||
N n,
|
||||
O o,
|
||||
P p,
|
||||
Q q);
|
||||
Q q,
|
||||
R r);
|
||||
|
||||
#if 0
|
||||
''' '
|
||||
|
||||
@@ -270,6 +270,27 @@ typedef struct {
|
||||
};
|
||||
} Q;
|
||||
|
||||
typedef enum {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
} R_Tag;
|
||||
|
||||
typedef struct {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
} IRBar_Body;
|
||||
|
||||
typedef struct {
|
||||
R_Tag tag;
|
||||
union {
|
||||
struct {
|
||||
int16_t IRFoo;
|
||||
};
|
||||
IRBar_Body IRBar;
|
||||
};
|
||||
} R;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
@@ -291,7 +312,8 @@ void root(Opaque *opaque,
|
||||
N n,
|
||||
O o,
|
||||
P p,
|
||||
Q q);
|
||||
Q q,
|
||||
R r);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@@ -208,6 +208,29 @@ struct Q {
|
||||
};
|
||||
};
|
||||
|
||||
struct R {
|
||||
enum class Tag {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
};
|
||||
|
||||
struct IRFoo_Body {
|
||||
int16_t _0;
|
||||
};
|
||||
|
||||
struct IRBar_Body {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
};
|
||||
|
||||
Tag tag;
|
||||
union {
|
||||
IRFoo_Body IRFoo;
|
||||
IRBar_Body IRBar;
|
||||
};
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
void root(Opaque *opaque,
|
||||
@@ -227,7 +250,8 @@ void root(Opaque *opaque,
|
||||
N n,
|
||||
O o,
|
||||
P p,
|
||||
Q q);
|
||||
Q q,
|
||||
R r);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
|
||||
@@ -165,6 +165,20 @@ cdef extern from *:
|
||||
uint32_t *ok;
|
||||
uint32_t err;
|
||||
|
||||
ctypedef enum R_Tag:
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
|
||||
ctypedef struct IRBar_Body:
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
|
||||
ctypedef struct R:
|
||||
R_Tag tag;
|
||||
int16_t IRFoo;
|
||||
IRBar_Body IRBar;
|
||||
|
||||
void root(Opaque *opaque,
|
||||
A a,
|
||||
B b,
|
||||
@@ -182,7 +196,8 @@ cdef extern from *:
|
||||
N n,
|
||||
O o,
|
||||
P p,
|
||||
Q q);
|
||||
Q q,
|
||||
R r);
|
||||
|
||||
#if 0
|
||||
''' '
|
||||
|
||||
@@ -204,6 +204,27 @@ struct Q {
|
||||
};
|
||||
};
|
||||
|
||||
enum R_Tag {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
};
|
||||
|
||||
struct IRBar_Body {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
};
|
||||
|
||||
struct R {
|
||||
enum R_Tag tag;
|
||||
union {
|
||||
struct {
|
||||
int16_t IRFoo;
|
||||
};
|
||||
struct IRBar_Body IRBar;
|
||||
};
|
||||
};
|
||||
|
||||
void root(struct Opaque *opaque,
|
||||
A a,
|
||||
B b,
|
||||
@@ -221,7 +242,8 @@ void root(struct Opaque *opaque,
|
||||
enum N n,
|
||||
O o,
|
||||
struct P p,
|
||||
struct Q q);
|
||||
struct Q q,
|
||||
struct R r);
|
||||
|
||||
#if 0
|
||||
''' '
|
||||
|
||||
@@ -270,6 +270,27 @@ struct Q {
|
||||
};
|
||||
};
|
||||
|
||||
enum R_Tag {
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
};
|
||||
|
||||
struct IRBar_Body {
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
};
|
||||
|
||||
struct R {
|
||||
enum R_Tag tag;
|
||||
union {
|
||||
struct {
|
||||
int16_t IRFoo;
|
||||
};
|
||||
struct IRBar_Body IRBar;
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
@@ -291,7 +312,8 @@ void root(struct Opaque *opaque,
|
||||
enum N n,
|
||||
O o,
|
||||
struct P p,
|
||||
struct Q q);
|
||||
struct Q q,
|
||||
struct R r);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@@ -165,6 +165,20 @@ cdef extern from *:
|
||||
uint32_t *ok;
|
||||
uint32_t err;
|
||||
|
||||
cdef enum R_Tag:
|
||||
IRFoo,
|
||||
IRBar,
|
||||
IRBaz,
|
||||
|
||||
cdef struct IRBar_Body:
|
||||
uint8_t x;
|
||||
int16_t y;
|
||||
|
||||
cdef struct R:
|
||||
R_Tag tag;
|
||||
int16_t IRFoo;
|
||||
IRBar_Body IRBar;
|
||||
|
||||
void root(Opaque *opaque,
|
||||
A a,
|
||||
B b,
|
||||
@@ -182,7 +196,8 @@ cdef extern from *:
|
||||
N n,
|
||||
O o,
|
||||
P p,
|
||||
Q q);
|
||||
Q q,
|
||||
R r);
|
||||
|
||||
#if 0
|
||||
''' '
|
||||
|
||||
@@ -133,6 +133,14 @@ enum Q {
|
||||
Err(u32),
|
||||
}
|
||||
|
||||
/// cbindgen:rename-variant-name-fields=None
|
||||
#[repr(C)]
|
||||
enum R {
|
||||
IRFoo(i16),
|
||||
IRBar { x: u8, y: i16 },
|
||||
IRBaz,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn root(
|
||||
opaque: *mut Opaque,
|
||||
@@ -153,5 +161,6 @@ pub extern "C" fn root(
|
||||
o: O,
|
||||
p: P,
|
||||
q: Q,
|
||||
r: R,
|
||||
) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user