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
Xavier Thompson
cython
Commits
0ce42ef1
Commit
0ce42ef1
authored
Jul 16, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix template function calls not generating 'pointer-to-cypclass' template parameters
parent
60421db2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+8
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
0ce42ef1
...
@@ -4241,9 +4241,16 @@ class IndexNode(_IndexingBaseNode):
...
@@ -4241,9 +4241,16 @@ class IndexNode(_IndexingBaseNode):
else
:
else
:
assert
False
,
"unexpected base type in indexing: %s"
%
self
.
base
.
type
assert
False
,
"unexpected base type in indexing: %s"
%
self
.
base
.
type
elif
self
.
base
.
type
.
is_cfunction
:
elif
self
.
base
.
type
.
is_cfunction
:
template_strings
=
[
"%s%s"
%
(
param
.
empty_declaration_code
(),
"*"
if
param
.
is_cyp_class
else
""
)
for
param
in
self
.
type_indices
]
return
"%s<%s>"
%
(
return
"%s<%s>"
%
(
self
.
base
.
result
(),
self
.
base
.
result
(),
","
.
join
(
[
param
.
empty_declaration_code
()
for
param
in
self
.
type_indices
]
))
","
.
join
(
template_strings
))
elif
self
.
base
.
type
.
is_ctuple
:
elif
self
.
base
.
type
.
is_ctuple
:
index
=
self
.
index
.
constant_result
index
=
self
.
index
.
constant_result
if
index
<
0
:
if
index
<
0
:
...
...
Cython/Compiler/PyrexTypes.py
View file @
0ce42ef1
...
@@ -4863,9 +4863,16 @@ def best_match(arg_types, functions, pos=None, env=None, args=None, throw=False)
...
@@ -4863,9 +4863,16 @@ def best_match(arg_types, functions, pos=None, env=None, args=None, throw=False)
else
:
else
:
type_list
=
[
deductions
[
param
]
for
param
in
func_type
.
templates
]
type_list
=
[
deductions
[
param
]
for
param
in
func_type
.
templates
]
from
.Symtab
import
Entry
from
.Symtab
import
Entry
template_cstrings
=
[
"%s%s"
%
(
t
.
empty_declaration_code
(),
"*"
if
t
.
is_cyp_class
else
""
)
for
t
in
type_list
]
specialization
=
Entry
(
specialization
=
Entry
(
name
=
func
.
name
+
"[%s]"
%
","
.
join
([
str
(
t
)
for
t
in
type_list
]),
name
=
func
.
name
+
"[%s]"
%
","
.
join
([
str
(
t
)
for
t
in
type_list
]),
cname
=
func
.
cname
+
"<%s>"
%
","
.
join
(
[
t
.
empty_declaration_code
()
for
t
in
type_list
]
),
cname
=
func
.
cname
+
"<%s>"
%
","
.
join
(
template_cstrings
),
type
=
func_type
.
specialize
(
deductions
),
type
=
func_type
.
specialize
(
deductions
),
pos
=
func
.
pos
)
pos
=
func
.
pos
)
candidates
.
append
((
specialization
,
specialization
.
type
))
candidates
.
append
((
specialization
,
specialization
.
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