| 1 |
#if 0 |
| 2 |
DEF DEFINED = 1 |
| 3 |
DEF NOT_DEFINED = 0 |
| 4 |
#endif |
| 5 |
|
| 6 |
|
| 7 |
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t |
| 8 |
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t |
| 9 |
cdef extern from *: |
| 10 |
ctypedef bint bool |
| 11 |
ctypedef struct va_list |
| 12 |
|
| 13 |
cdef extern from *: |
| 14 |
|
| 15 |
IF NOT_DEFINED: |
| 16 |
const int32_t DEFAULT_X # = 8 |
| 17 |
|
| 18 |
IF DEFINED: |
| 19 |
const int32_t DEFAULT_X # = 42 |
| 20 |
|
| 21 |
IF (NOT_DEFINED or DEFINED): |
| 22 |
ctypedef struct Foo: |
| 23 |
int32_t x; |
| 24 |
|
| 25 |
IF NOT_DEFINED: |
| 26 |
ctypedef struct Bar: |
| 27 |
Foo y; |
| 28 |
|
| 29 |
IF DEFINED: |
| 30 |
ctypedef struct Bar: |
| 31 |
Foo z; |
| 32 |
|
| 33 |
ctypedef struct Root: |
| 34 |
Bar w; |
| 35 |
|
| 36 |
void root(Root a); |