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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
dbefbb55
Commit
dbefbb55
authored
Apr 10, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test that safe cases do not raise errors
parent
1bd74d59
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
tests/errors/charptr_from_temp.pyx
tests/errors/charptr_from_temp.pyx
+11
-2
No files found.
tests/errors/charptr_from_temp.pyx
View file @
dbefbb55
# mode: error
# tag: werror, charptr, conversion, temp
cdef
bytes
c_s
=
b"abc"
s
=
b"abc"
cdef
char
*
cptr
# constant => ok
cptr
=
b"xyz"
# global cdef variable => ok
cptr
=
c_s
# pyglobal => warning
cptr
=
s
# temp => error
cptr
=
s
+
b"cba"
_ERRORS
=
"""
8
:8: Obtaining char* from externally modifiable global Python value
1
0
:9: Obtaining char* from temporary Python value
16
:8: Obtaining char* from externally modifiable global Python value
1
9
:9: Obtaining char* from temporary Python value
"""
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