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
74d42469
Commit
74d42469
authored
Jul 06, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comment
parent
1e798705
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+5
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
74d42469
...
...
@@ -10866,6 +10866,11 @@ class CoerceFromPyTypeNode(CoercionNode):
"Cannot convert Python object to '%s'"
%
result_type
)
if
self
.
type
.
is_string
or
self
.
type
.
is_pyunicode_ptr
:
if
self
.
arg
.
is_ephemeral
():
# FIXME: instead of always raising an error here, we should trace what happens
# with the result (by passing on the "ephemeral" state) and only raise the
# error when we notice illegal usage. Something like "(<char*>pystr)[0] + 1"
# can be perfectly legal, whereas "cdef char* s = pystr1 + pystr2" should
# fail on the assignment.
error
(
arg
.
pos
,
"Obtaining '%s' from temporary Python value"
%
result_type
)
elif
self
.
arg
.
is_name
and
self
.
arg
.
entry
and
self
.
arg
.
entry
.
is_pyglobal
:
...
...
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