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
3d79fba4
Commit
3d79fba4
authored
Apr 24, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cypclass members access
parent
4136cc2c
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 @
3d79fba4
...
...
@@ -6907,7 +6907,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
):
...
...
@@ -6920,6 +6920,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
...
...
@@ -6930,6 +6933,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
:
...
...
@@ -7061,6 +7065,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