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
556f15c6
Commit
556f15c6
authored
Feb 19, 2010
by
daniloaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix on constructor call from cimported C++ classes
parent
83949399
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+5
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
556f15c6
...
@@ -1049,7 +1049,8 @@ class NewExprNode(AtomicExprNode):
...
@@ -1049,7 +1049,8 @@ class NewExprNode(AtomicExprNode):
# template_parameters None or [ExprNode] temlate parameters, if any
# template_parameters None or [ExprNode] temlate parameters, if any
def
infer_type
(
self
,
env
):
def
infer_type
(
self
,
env
):
entry
=
env
.
lookup
(
self
.
cppclass
)
cppclass
=
self
.
cppclass
.
analyse_as_type
(
env
)
entry
=
env
.
lookup
(
cppclass
.
name
)
if
entry
is
None
or
not
entry
.
is_cpp_class
:
if
entry
is
None
or
not
entry
.
is_cpp_class
:
error
(
self
.
pos
,
"new operator can only be applied to a C++ class"
)
error
(
self
.
pos
,
"new operator can only be applied to a C++ class"
)
return
return
...
...
Cython/Compiler/Parsing.py
View file @
556f15c6
...
@@ -316,7 +316,11 @@ def p_new_expr(s):
...
@@ -316,7 +316,11 @@ def p_new_expr(s):
# s.systring == 'new'.
# s.systring == 'new'.
pos
=
s
.
position
()
pos
=
s
.
position
()
s
.
next
()
s
.
next
()
name
=
p_ident
(
s
)
node
=
p_atom
(
s
)
if
s
.
sy
==
'.'
:
name
=
p_trailer
(
s
,
node
)
else
:
name
=
node
if
s
.
sy
==
'['
:
if
s
.
sy
==
'['
:
s
.
next
()
s
.
next
()
template_parameters
=
p_simple_expr_list
(
s
)
template_parameters
=
p_simple_expr_list
(
s
)
...
...
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