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
b09fd118
Commit
b09fd118
authored
Apr 24, 2019
by
gsamain
Committed by
Xavier Thompson
Jun 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cypclass members access
parent
2ec99095
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
b09fd118
...
...
@@ -6987,7 +6987,7 @@ class AttributeNode(ExprNode):
else
:
# Create a temporary entry describing the C method
# as an ordinary function.
if
entry
.
func_cname
and
not
hasattr
(
entry
.
type
,
'op_arg_struct'
):
if
entry
.
func_cname
and
not
hasattr
(
entry
.
type
,
'op_arg_struct'
)
and
not
type
.
is_cyp_class
:
cname
=
entry
.
func_cname
if
entry
.
type
.
is_static_method
or
(
env
.
parent_scope
and
env
.
parent_scope
.
is_cpp_class_scope
):
...
...
@@ -7000,6 +7000,9 @@ class AttributeNode(ExprNode):
ctype
=
copy
.
copy
(
entry
.
type
)
ctype
.
args
=
ctype
.
args
[:]
ctype
.
args
[
0
]
=
PyrexTypes
.
CFuncTypeArg
(
'self'
,
type
,
'self'
,
None
)
elif
type
.
is_cyp_class
and
entry
.
func_cname
:
cname
=
entry
.
func_cname
ctype
=
entry
.
type
else
:
cname
=
"%s->%s"
%
(
type
.
vtabptr_cname
,
entry
.
cname
)
ctype
=
entry
.
type
...
...
@@ -7010,6 +7013,7 @@ class AttributeNode(ExprNode):
ubcm_entry
.
scope
=
entry
.
scope
if
type
.
is_cpp_class
:
ubcm_entry
.
overloaded_alternatives
=
[
Symtab
.
Entry
(
entry
.
name
,
entry
.
func_cname
,
entry
.
type
)
for
entry
in
entry
.
overloaded_alternatives
]
self
.
entry
=
ubcm_entry
return
self
.
as_name_node
(
env
,
ubcm_entry
,
target
=
False
)
elif
type
.
is_enum
:
if
self
.
attribute
in
type
.
values
:
...
...
@@ -7149,6 +7153,11 @@ class AttributeNode(ExprNode):
self
.
type
=
entry
.
type
self
.
member
=
entry
.
cname
return
elif
entry
.
type
.
is_cpp_class
and
entry
.
is_type
:
# This could be a c++ class trying to access a parent type
self
.
type
=
entry
.
type
self
.
member
=
entry
.
cname
return
else
:
# If it's not a variable or C method, it must be a Python
# method of an extension type, so we treat it like a Python
...
...
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