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
4d5173e5
Commit
4d5173e5
authored
Sep 04, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix generation of cypclass virtual methods for MRO hookback
parent
c0eca721
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+6
-4
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-1
No files found.
Cython/Compiler/ModuleNode.py
View file @
4d5173e5
...
@@ -1784,8 +1784,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1784,8 +1784,9 @@ 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_names
=
[
"%s_%d"
%
(
arg
.
cname
,
i
)
for
i
,
arg
in
enumerate
(
e
.
type
.
args
)]
min_nargs
=
len
(
e
.
type
.
args
)
-
e
.
type
.
optional_arg_count
arg_decls
=
[
arg
.
type
.
declaration_code
(
arg_name
)
for
arg
,
arg_name
in
zip
(
e
.
type
.
args
,
arg_names
)]
arg_names
=
[
arg
.
cname
for
arg
in
e
.
type
.
args
[:
min_nargs
]]
arg_decls
=
[
arg
.
declaration_code
()
for
arg
in
e
.
type
.
args
[:
min_nargs
]]
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
))
...
@@ -1814,8 +1815,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1814,8 +1815,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
func_type
=
static_method
.
type
func_type
=
static_method
.
type
modifiers
=
code
.
build_function_modifiers
(
static_method
.
func_modifiers
)
modifiers
=
code
.
build_function_modifiers
(
static_method
.
func_modifiers
)
arg_names
=
[
"%s_%d"
%
(
arg
.
cname
,
i
)
for
i
,
arg
in
enumerate
(
func_type
.
args
)]
min_nargs
=
len
(
func_type
.
args
)
-
func_type
.
optional_arg_count
arg_decls
=
[
arg
.
type
.
declaration_code
(
arg_name
)
for
arg
,
arg_name
in
zip
(
func_type
.
args
,
arg_names
)]
arg_names
=
[
arg
.
cname
for
arg
in
func_type
.
args
[:
min_nargs
]]
arg_decls
=
[
arg
.
declaration_code
()
for
arg
in
func_type
.
args
[:
min_nargs
]]
if
func_type
.
optional_arg_count
:
if
func_type
.
optional_arg_count
:
opt_name
=
Naming
.
optional_args_cname
opt_name
=
Naming
.
optional_args_cname
arg_decls
.
append
(
func_type
.
op_arg_struct
.
declaration_code
(
opt_name
))
arg_decls
.
append
(
func_type
.
op_arg_struct
.
declaration_code
(
opt_name
))
...
...
Cython/Compiler/Symtab.py
View file @
4d5173e5
...
@@ -2992,7 +2992,7 @@ class CppClassScope(Scope):
...
@@ -2992,7 +2992,7 @@ class CppClassScope(Scope):
entry
.
original_name
=
original_name
entry
.
original_name
=
original_name
if
(
self
.
parent_type
.
is_cyp_class
and
type
.
is_static_method
and
name
not
in
(
"<alloc>"
,
"__new__"
)):
if
(
self
.
parent_type
.
is_cyp_class
and
type
.
is_static_method
and
name
not
in
(
"<alloc>"
,
"__new__"
)):
entry
.
static_cname
=
"%s__static__%s"
%
(
Naming
.
func_prefix
,
cname
)
entry
.
static_cname
=
"%s__static__%s"
%
(
Naming
.
func_prefix
,
cname
or
name
)
if
reify
:
if
reify
:
self
.
reify_method
(
entry
)
self
.
reify_method
(
entry
)
...
...
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