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
777c314b
Commit
777c314b
authored
Jun 16, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
e27d9593
3074c1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
tests/run/cascaded_typed_assignments_T466.pyx
tests/run/cascaded_typed_assignments_T466.pyx
+47
-0
No files found.
tests/run/cascaded_typed_assignments_T466.pyx
View file @
777c314b
# mode: run
# ticket: 466
# extension to T409
...
...
@@ -20,3 +21,49 @@ def simple_parallel_int_mix():
cdef
object
ao
,
bo
ai
,
bi
=
al
,
bl
=
ao
,
bo
=
c
=
d
=
[
1
,
2
]
return
ao
,
bo
,
ai
,
bi
,
al
,
bl
,
c
,
d
cdef
int
called
=
0
cdef
char
*
get_string
():
global
called
called
+=
1
return
"abcdefg"
def
non_simple_rhs
():
"""
>>> non_simple_rhs()
1
"""
cdef
char
*
a
,
*
b
cdef
int
orig_called
=
called
a
=
b
=
<
char
*>
get_string
()
assert
a
is
b
return
called
-
orig_called
from
libc.stdlib
cimport
malloc
,
free
def
non_simple_rhs_malloc
():
"""
>>> non_simple_rhs_malloc()
"""
cdef
char
*
a
,
*
b
,
**
c
c
=
&
b
c
[
0
]
=
a
=
<
char
*>
malloc
(
2
)
a
[
0
]
=
c
'X'
b
[
1
]
=
c
'
\
0
'
# copy from different pointers to make sure they all point to the
# same memory
cdef
char
[
2
]
x
x
[
0
]
=
b
[
0
]
x
[
1
]
=
a
[
1
]
# clean up
free
(
a
)
if
b
is
not
a
:
# shouldn't happen
free
(
b
)
# check copied values
assert
x
[
0
]
==
c
'X'
assert
x
[
1
]
==
c
'
\
0
'
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