Commit dbefbb55 authored by Stefan Behnel's avatar Stefan Behnel

test that safe cases do not raise errors

parent 1bd74d59
# 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
10:9: Obtaining char* from temporary Python value
16:8: Obtaining char* from externally modifiable global Python value
19:9: Obtaining char* from temporary Python value
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment