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
3b042e83
Commit
3b042e83
authored
Jul 08, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make generated MRO 'hookback' methods for cypclasses more robust
parent
63b62dab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+3
-2
No files found.
Cython/Compiler/ModuleNode.py
View file @
3b042e83
...
@@ -1168,6 +1168,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1168,6 +1168,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
e
.
is_cfunction
if
e
.
is_cfunction
and
e
.
from_type
and
e
.
from_type
and
e
.
mro_index
>
0
and
e
.
mro_index
>
0
and
e
.
from_type
.
is_cyp_class
# avoid dealing with methods inherited from non-cypclass bases for now
and
not
e
.
type
.
is_static_method
# avoid dealing with static methods for now
and
not
e
.
type
.
is_static_method
# avoid dealing with static methods for now
and
e
.
name
not
in
(
"<init>"
,
"<del>"
)
and
e
.
name
not
in
(
"<init>"
,
"<del>"
)
and
not
e
.
type
.
has_varargs
# avoid dealing with varargs for now (is this ever required anyway ?)
and
not
e
.
type
.
has_varargs
# avoid dealing with varargs for now (is this ever required anyway ?)
...
@@ -1178,8 +1179,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1178,8 +1179,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
for
e
in
inherited_methods
:
for
e
in
inherited_methods
:
modifiers
=
code
.
build_function_modifiers
(
e
.
func_modifiers
)
modifiers
=
code
.
build_function_modifiers
(
e
.
func_modifiers
)
arg_
decls
=
[
arg
.
declaration_code
()
for
arg
in
e
.
type
.
args
]
arg_
names
=
[
"%s_%d"
%
(
arg
.
cname
,
i
)
for
i
,
arg
in
enumerate
(
e
.
type
.
args
)
]
arg_
names
=
[
arg
.
cname
for
arg
in
e
.
type
.
args
]
arg_
decls
=
[
arg
.
type
.
declaration_code
(
arg_name
)
for
arg
,
arg_name
in
zip
(
e
.
type
.
args
,
arg_names
)
]
if
e
.
type
.
optional_arg_count
:
if
e
.
type
.
optional_arg_count
:
opt_name
=
Naming
.
optional_args_cname
opt_name
=
Naming
.
optional_args_cname
arg_decls
.
append
(
e
.
type
.
op_arg_struct
.
declaration_code
(
opt_name
))
arg_decls
.
append
(
e
.
type
.
op_arg_struct
.
declaration_code
(
opt_name
))
...
...
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