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
15205ce9
Commit
15205ce9
authored
Jul 06, 2018
by
scoder
Committed by
GitHub
Jul 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2413 from gabrieldemarmiesse/test_language_basics_3
Added tests for "language basics" part 3
parents
b7ca7dc3
0d666f3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
docs/examples/userguide/language_basics/cdef_block.pyx
docs/examples/userguide/language_basics/cdef_block.pyx
+12
-0
docs/src/userguide/language_basics.rst
docs/src/userguide/language_basics.rst
+2
-13
No files found.
docs/examples/userguide/language_basics/cdef_block.pyx
0 → 100644
View file @
15205ce9
from
__future__
import
print_function
cdef
:
struct
Spam
:
int
tons
int
i
float
a
Spam
*
p
void
f
(
Spam
*
s
):
print
(
s
.
tons
,
"Tons of spam"
)
docs/src/userguide/language_basics.rst
View file @
15205ce9
...
...
@@ -179,20 +179,9 @@ Grouping multiple C declarations
--------------------------------
If you have a series of declarations that all begin with :keyword:`cdef`, you
can group them into a :keyword:`cdef` block like this:
:
can group them into a :keyword:`cdef` block like this:
from __future__ import print_function
cdef:
struct Spam:
int tons
int i
float a
Spam *p
void f(Spam *s):
print(s.tons, "Tons of spam")
.. literalinclude:: ../../examples/userguide/language_basics/cdef_block.pyx
.. _cpdef:
.. _cdef:
...
...
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