summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/language_basics/struct_union_enum.pyx
blob: af9b06d9a63a8cabe354d2d2f0763fe34277c923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
cdef struct Grail:
    int age
    float volume

cdef union Food:
    char *spam
    float *eggs

cdef enum CheeseType:
    cheddar, edam,
    camembert

cdef enum CheeseState:
    hard = 1
    soft = 2
    runny = 3