Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
aff9e06f
Commit
aff9e06f
authored
Jun 15, 2018
by
scoder
Committed by
GitHub
Jun 15, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2351 from gabrieldemarmiesse/language_basics_1
Adding test for "language basics" part 1
parents
df2d6b52
35be7bac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
docs/examples/userguide/language_basics/struct_union_enum.pyx
.../examples/userguide/language_basics/struct_union_enum.pyx
+16
-0
docs/src/userguide/language_basics.rst
docs/src/userguide/language_basics.rst
+2
-17
No files found.
docs/examples/userguide/language_basics/struct_union_enum.pyx
0 → 100644
View file @
aff9e06f
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
docs/src/userguide/language_basics.rst
View file @
aff9e06f
...
...
@@ -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`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment