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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
9e0bcda8
Commit
9e0bcda8
authored
Mar 11, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cypclass Cyobject base added after type analysis
parent
ec9d4af3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+15
-10
No files found.
Cython/Compiler/Nodes.py
View file @
9e0bcda8
...
@@ -1485,15 +1485,6 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
...
@@ -1485,15 +1485,6 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
base_classes
=
[],
visibility
=
self
.
visibility
,
templates
=
template_types
,
cypclass
=
self
.
cypclass
)
base_classes
=
[],
visibility
=
self
.
visibility
,
templates
=
template_types
,
cypclass
=
self
.
cypclass
)
def
analyse_declarations
(
self
,
env
):
def
analyse_declarations
(
self
,
env
):
if
self
.
cypclass
:
cyobject_class
=
CSimpleBaseTypeNode
(
self
.
pos
,
name
=
"cyobject"
,
module_path
=
[],
is_basic_c_type
=
0
,
signed
=
0
,
complex
=
0
,
longness
=
0
,
is_self_arg
=
0
,
templates
=
None
)
self
.
base_classes
.
append
(
cyobject_class
)
if
self
.
templates
is
None
:
if
self
.
templates
is
None
:
template_types
=
template_names
=
None
template_types
=
template_names
=
None
else
:
else
:
...
@@ -1508,7 +1499,21 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
...
@@ -1508,7 +1499,21 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
return
True
return
True
else
:
else
:
error
(
self
.
pos
,
"Base class '%s' not a struct or class."
%
base_class
)
error
(
self
.
pos
,
"Base class '%s' not a struct or class."
%
base_class
)
base_class_types
=
filter
(
base_ok
,
[
b
.
analyse
(
scope
or
env
)
for
b
in
self
.
base_classes
])
base_types_list
=
[
b
.
analyse
(
scope
or
env
)
for
b
in
self
.
base_classes
]
if
self
.
cypclass
:
cyobject_base
=
False
for
base_type
in
base_types_list
:
cyobject_base
=
cyobject_base
or
base_type
is
cy_object_type
or
base_type
.
is_cyp_class
if
not
cyobject_base
:
cyobject_class
=
CSimpleBaseTypeNode
(
self
.
pos
,
name
=
"cyobject"
,
module_path
=
[],
is_basic_c_type
=
0
,
signed
=
0
,
complex
=
0
,
longness
=
0
,
is_self_arg
=
0
,
templates
=
None
)
self
.
base_classes
.
append
(
cyobject_class
)
base_types_list
.
append
(
cyobject_class
.
analyse
(
scope
or
env
))
base_class_types
=
filter
(
base_ok
,
base_types_list
)
self
.
entry
=
env
.
declare_cpp_class
(
self
.
entry
=
env
.
declare_cpp_class
(
self
.
name
,
scope
,
self
.
pos
,
self
.
name
,
scope
,
self
.
pos
,
self
.
cname
,
base_class_types
,
visibility
=
self
.
visibility
,
templates
=
template_types
,
cypclass
=
self
.
cypclass
)
self
.
cname
,
base_class_types
,
visibility
=
self
.
visibility
,
templates
=
template_types
,
cypclass
=
self
.
cypclass
)
...
...
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