Commit 15205ce9 authored by scoder's avatar scoder Committed by GitHub

Merge pull request #2413 from gabrieldemarmiesse/test_language_basics_3

Added tests for "language basics" part 3
parents b7ca7dc3 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")
......@@ -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:
......
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