| 1 |
#define MUST_USE_FUNC __attribute__((warn_unused_result)) |
| 2 |
#define MUST_USE_STRUCT __attribute__((warn_unused)) |
| 3 |
#define MUST_USE_ENUM /* nothing */ |
| 4 |
|
| 5 |
|
| 6 |
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t |
| 7 |
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t |
| 8 |
cdef extern from *: |
| 9 |
ctypedef bint bool |
| 10 |
ctypedef struct va_list |
| 11 |
|
| 12 |
cdef extern from *: |
| 13 |
|
| 14 |
cdef enum: |
| 15 |
Owned_i32, |
| 16 |
None_i32, |
| 17 |
ctypedef uint8_t MaybeOwnedPtr_i32_Tag; |
| 18 |
|
| 19 |
ctypedef struct MaybeOwnedPtr_i32: |
| 20 |
MaybeOwnedPtr_i32_Tag tag; |
| 21 |
int32_t *owned; |
| 22 |
|
| 23 |
ctypedef struct OwnedPtr_i32: |
| 24 |
int32_t *ptr; |
| 25 |
|
| 26 |
MaybeOwnedPtr_i32 maybe_consume(OwnedPtr_i32 input); |