Commit aff9e06f authored by scoder's avatar scoder Committed by GitHub

Merge pull request #2351 from gabrieldemarmiesse/language_basics_1

Adding test for "language basics" part 1
parents df2d6b52 35be7bac
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
......@@ -50,24 +50,9 @@ module-level::
cdef int i, j, k
cdef float f, g[42], *h
and C :keyword:`struct`, :keyword:`union` or :keyword:`enum` types::
and C :keyword:`struct`, :keyword:`union` or :keyword:`enum` types:
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
.. literalinclude:: ../../examples/userguide/language_basics/struct_union_enum.pyx
See also :ref:`struct-union-enum-styles`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment