Commit 35be7bac authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Moved a code snippet from language_basics.rst to the examples directory for testing.

parent ff577a2b
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:: ...@@ -50,24 +50,9 @@ module-level::
cdef int i, j, k cdef int i, j, k
cdef float f, g[42], *h 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: .. literalinclude:: ../../examples/userguide/language_basics/struct_union_enum.pyx
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
See also :ref:`struct-union-enum-styles` 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