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
Boxiang Sun
cython
Commits
c192ad41
Commit
c192ad41
authored
May 14, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow <MyStruct*>obj as well; as there is no canonical PyObject
parent
140313e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
c192ad41
...
@@ -3939,7 +3939,8 @@ class TypecastNode(NewTempExprNode):
...
@@ -3939,7 +3939,8 @@ class TypecastNode(NewTempExprNode):
if
self
.
type
.
from_py_function
:
if
self
.
type
.
from_py_function
:
self
.
operand
=
self
.
operand
.
coerce_to
(
self
.
type
,
env
)
self
.
operand
=
self
.
operand
.
coerce_to
(
self
.
type
,
env
)
elif
self
.
type
.
is_ptr
:
elif
self
.
type
.
is_ptr
:
if
not
self
.
type
.
base_type
.
is_void
:
base_type
=
self
.
type
.
base_type
if
not
base_type
.
is_void
and
not
base_type
.
is_struct
:
error
(
self
.
pos
,
"Python objects can only be cast to void*"
)
error
(
self
.
pos
,
"Python objects can only be cast to void*"
)
else
:
else
:
warning
(
self
.
pos
,
"No conversion from %s to %s, python object pointer used."
%
(
self
.
type
,
self
.
operand
.
type
))
warning
(
self
.
pos
,
"No conversion from %s to %s, python object pointer used."
%
(
self
.
type
,
self
.
operand
.
type
))
...
...
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