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
79f88002
Commit
79f88002
authored
Jun 22, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed a comment to make it more meaningful.
parent
d5e107a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
docs/examples/tutorial/clibraries/queue3.pyx
docs/examples/tutorial/clibraries/queue3.pyx
+1
-1
docs/src/tutorial/clibraries.rst
docs/src/tutorial/clibraries.rst
+1
-1
No files found.
docs/examples/tutorial/clibraries/queue3.pyx
View file @
79f88002
...
@@ -39,7 +39,7 @@ cdef class Queue:
...
@@ -39,7 +39,7 @@ cdef class Queue:
cdef
extend_ints
(
self
,
int
*
values
,
size_t
count
):
cdef
extend_ints
(
self
,
int
*
values
,
size_t
count
):
cdef
int
value
cdef
int
value
for
value
in
values
[:
count
]:
#
It is possible to slice pointers in Cython
.
for
value
in
values
[:
count
]:
#
Slicing pointer to limit the iteration boundaries
.
self
.
append
(
value
)
self
.
append
(
value
)
cpdef
int
peek
(
self
)
except
?
-
1
:
cpdef
int
peek
(
self
)
except
?
-
1
:
...
...
docs/src/tutorial/clibraries.rst
View file @
79f88002
...
@@ -343,7 +343,7 @@ Adding an ``extend()`` method should now be straight forward::
...
@@ -343,7 +343,7 @@ Adding an ``extend()`` method should now be straight forward::
"""Append all ints to the queue.
"""Append all ints to the queue.
"""
"""
cdef int value
cdef int value
for value in values[:count]: #
It is possible to slice pointers in Cython
.
for value in values[:count]: #
Slicing pointer to limit the iteration boundaries
.
self.append(value)
self.append(value)
This becomes handy when reading values from a C array, for example.
This becomes handy when reading values from a C array, for example.
...
...
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