| 1 |
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t |
| 2 |
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t |
| 3 |
cdef extern from *: |
| 4 |
ctypedef bint bool |
| 5 |
ctypedef struct va_list |
| 6 |
|
| 7 |
cdef extern from *: |
| 8 |
|
| 9 |
cdef enum: |
| 10 |
A_A1, |
| 11 |
A_A2, |
| 12 |
A_A3, |
| 13 |
# Must be last for serialization purposes |
| 14 |
A_Sentinel, |
| 15 |
ctypedef uint8_t A; |
| 16 |
|
| 17 |
cdef enum: |
| 18 |
B_B1, |
| 19 |
B_B2, |
| 20 |
B_B3, |
| 21 |
# Must be last for serialization purposes |
| 22 |
B_Sentinel, |
| 23 |
ctypedef uint8_t B; |
| 24 |
|
| 25 |
cdef enum: |
| 26 |
C_C1, |
| 27 |
C_C2, |
| 28 |
C_C3, |
| 29 |
# Must be last for serialization purposes |
| 30 |
C_Sentinel, |
| 31 |
ctypedef uint8_t C_Tag; |
| 32 |
|
| 33 |
ctypedef struct C_C1_Body: |
| 34 |
C_Tag tag; |
| 35 |
uint32_t a; |
| 36 |
|
| 37 |
ctypedef struct C_C2_Body: |
| 38 |
C_Tag tag; |
| 39 |
uint32_t b; |
| 40 |
|
| 41 |
ctypedef union C: |
| 42 |
C_Tag tag; |
| 43 |
C_C1_Body c1; |
| 44 |
C_C2_Body c2; |
| 45 |
|
| 46 |
void root(A a, B b, C c); |