parent
5a22bcf007
commit
c39a379942
3 changed files with 70 additions and 0 deletions
|
|
@ -114,4 +114,50 @@ typedef struct OutSt {
|
|||
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
typedef struct {
|
||||
union x_union {
|
||||
int x;
|
||||
} duplicate_p;
|
||||
} x_t;
|
||||
|
||||
typedef struct {
|
||||
union y_union {
|
||||
int y;
|
||||
} duplicate_p;
|
||||
} y_t;
|
||||
|
||||
typedef struct A {
|
||||
union a_union {
|
||||
int a;
|
||||
} duplicate_p;
|
||||
} a_t;
|
||||
|
||||
typedef struct B {
|
||||
union b_union {
|
||||
int b;
|
||||
} duplicate_p;
|
||||
} b_t;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
int c;
|
||||
} duplicate_p;
|
||||
} c_t;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
int d;
|
||||
} duplicate_p;
|
||||
} d_t;
|
||||
|
||||
void set_union_values(int startval, x_t *x, y_t *y, a_t *a, b_t *b, c_t *c, d_t *d) {
|
||||
x->duplicate_p.x = startval++;
|
||||
y->duplicate_p.y = startval++;
|
||||
a->duplicate_p.a = startval++;
|
||||
b->duplicate_p.b = startval++;
|
||||
c->duplicate_p.c = startval++;
|
||||
d->duplicate_p.d = startval++;
|
||||
}
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue