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
d4d80930
Commit
d4d80930
authored
Jul 20, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test case for for-loop assignment to buffer
parent
4e6e24a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
tests/run/bufaccess.pyx
tests/run/bufaccess.pyx
+16
-0
No files found.
tests/run/bufaccess.pyx
View file @
d4d80930
...
...
@@ -40,6 +40,17 @@ __doc__ = u"""
0 1 2 3 4 5
released A
#>>> forin_assignment([A, B, A], 3)
acquired A
3
released A
acquired B
3
released B
acquired A
3
released A
>>> printbuf_float(MockBuffer("f", [1.0, 1.25, 0.75, 1.0]), (4,))
acquired
1.0 1.25 0.75 1.0
...
...
@@ -99,6 +110,11 @@ def cdef_assignment(obj, n):
print
buf
[
i
],
print
def
forin_assignment
(
objs
,
int
pick
):
cdef
object
[
int
]
buf
for
buf
in
objs
:
print
buf
[
pick
]
def
printbuf_float
(
o
,
shape
):
# should make shape builtin
cdef
object
[
float
]
buf
...
...
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