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
a3a35f91
Commit
a3a35f91
authored
May 11, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix char* coercion test
parent
3215d750
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
tests/run/ctypedef_char_types.pyx
tests/run/ctypedef_char_types.pyx
+7
-6
No files found.
tests/run/ctypedef_char_types.pyx
View file @
a3a35f91
...
...
@@ -22,13 +22,13 @@ def const_charptrs():
my_st
=
st
assert
typeof
(
my_st
)
==
"const_char *"
,
typeof
(
my_st
)
obj
=
my_st
assert
obj
==
b'XYZ'
assert
obj
==
b'XYZ'
,
obj
assert
typeof
(
ust
)
==
"const_uchar *"
,
typeof
(
ust
)
my_ust
=
ust
assert
typeof
(
my_ust
)
==
"const_uchar *"
,
typeof
(
my_ust
)
obj
=
my_ust
assert
obj
==
b'XYZ'
assert
obj
==
b'XYZ'
,
obj
ctypedef
char
mychar
ctypedef
unsigned
char
myuchar
...
...
@@ -41,17 +41,18 @@ def const_char_arrays():
cdef
object
obj
cdef
mychar
[
4
]
st
cdef
myuchar
[
4
]
ust
cdef
char
ch
i
=
0
for
ch
in
<
char
*>
b'XYZ
\
0
'
:
for
ch
in
b'XYZ
\
0
'
:
st
[
i
]
=
ch
ust
[
i
]
=
ch
ust
[
i
]
=
<
unsigned
char
>
ch
i
+=
1
assert
typeof
(
st
)
==
"mychar [4]"
,
typeof
(
st
)
obj
=
st
assert
obj
==
b'XYZ'
assert
obj
==
b'XYZ'
,
obj
assert
typeof
(
ust
)
==
"myuchar [4]"
,
typeof
(
ust
)
obj
=
ust
assert
obj
==
b'XYZ'
assert
obj
==
b'XYZ'
,
obj
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