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
16bc867e
Commit
16bc867e
authored
Sep 09, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let template cypclass typedefs resolve to raw cypclass pointers when instanciated
parent
a1127594
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+7
-1
No files found.
Cython/Compiler/PyrexTypes.py
View file @
16bc867e
...
@@ -405,9 +405,11 @@ class CTypedefType(BaseType):
...
@@ -405,9 +405,11 @@ class CTypedefType(BaseType):
# typedef_cname string
# typedef_cname string
# typedef_base_type PyrexType
# typedef_base_type PyrexType
# typedef_is_external bool
# typedef_is_external bool
# is_specialised bool
is_typedef
=
1
is_typedef
=
1
typedef_is_external
=
0
typedef_is_external
=
0
is_specialised
=
0
to_py_utility_code
=
None
to_py_utility_code
=
None
from_py_utility_code
=
None
from_py_utility_code
=
None
...
@@ -436,6 +438,8 @@ class CTypedefType(BaseType):
...
@@ -436,6 +438,8 @@ class CTypedefType(BaseType):
base_code
=
public_decl
(
self
.
typedef_cname
,
dll_linkage
)
base_code
=
public_decl
(
self
.
typedef_cname
,
dll_linkage
)
if
self
.
typedef_namespace
is
not
None
and
not
pyrex
:
if
self
.
typedef_namespace
is
not
None
and
not
pyrex
:
base_code
=
"%s::%s"
%
(
namespace_declaration_code
(
self
.
typedef_namespace
),
base_code
)
base_code
=
"%s::%s"
%
(
namespace_declaration_code
(
self
.
typedef_namespace
),
base_code
)
if
self
.
is_specialised
and
self
.
is_cyp_class
and
entity_code
:
base_code
=
"Cy_Raw<%s>"
%
base_code
return
self
.
base_declaration_code
(
base_code
,
entity_code
)
return
self
.
base_declaration_code
(
base_code
,
entity_code
)
def
as_argument_type
(
self
):
def
as_argument_type
(
self
):
...
@@ -456,8 +460,10 @@ class CTypedefType(BaseType):
...
@@ -456,8 +460,10 @@ class CTypedefType(BaseType):
if
base_type
is
self
.
typedef_base_type
and
namespace
is
self
.
typedef_namespace
:
if
base_type
is
self
.
typedef_base_type
and
namespace
is
self
.
typedef_namespace
:
return
self
return
self
else
:
else
:
return
create_typedef_type
(
self
.
typedef_name
,
base_type
,
self
.
typedef_cname
,
specialized_type
=
create_typedef_type
(
self
.
typedef_name
,
base_type
,
self
.
typedef_cname
,
0
,
namespace
)
0
,
namespace
)
specialized_type
.
is_specialised
=
base_type
is
not
self
.
typedef_base_type
return
specialized_type
def
__repr__
(
self
):
def
__repr__
(
self
):
return
"<CTypedefType %s>"
%
self
.
typedef_cname
return
"<CTypedefType %s>"
%
self
.
typedef_cname
...
...
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