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
Kirill Smelkov
cython
Commits
0d666f3b
Commit
0d666f3b
authored
Jun 25, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved an example of the language basics into the examples directory.
parent
084a25f5
Changes
2
Show 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 @
0d666f3b
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 @
0d666f3b
...
@@ -179,20 +179,9 @@ Grouping multiple C declarations
...
@@ -179,20 +179,9 @@ Grouping multiple C declarations
--------------------------------
--------------------------------
If you have a series of declarations that all begin with :keyword:`cdef`, you
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
.. literalinclude:: ../../examples/userguide/language_basics/cdef_block.pyx
cdef:
struct Spam:
int tons
int i
float a
Spam *p
void f(Spam *s):
print(s.tons, "Tons of spam")
.. _cpdef:
.. _cpdef:
.. _cdef:
.. _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