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
ef2a5f1a
Commit
ef2a5f1a
authored
5 years ago
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct CppClassScope to allow method overloading with different signature
parent
f28d4ef9
nogil_cypclass_acthon_on_rc8v3
nogil_cypclass_rc8
nogil_cypclass_lock_on_rc8v3
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+7
-4
No files found.
Cython/Compiler/Symtab.py
View file @
ef2a5f1a
...
...
@@ -2417,15 +2417,17 @@ class CppClassScope(Scope):
cname
=
name
entry
=
self
.
lookup_here
(
name
)
if
defining
and
entry
is
not
None
:
if
entry
.
type
.
same_as
(
type
):
if
type
.
is_cfunction
:
entry
=
self
.
declare
(
name
,
cname
,
type
,
pos
,
visibility
)
elif
entry
.
type
.
same_as
(
type
):
# Fix with_gil vs nogil.
entry
.
type
=
entry
.
type
.
with_with_gil
(
type
.
with_gil
)
elif
type
.
is_cfunction
and
type
.
compatible_signature_with
(
entry
.
type
):
entry
.
type
=
type
else
:
error
(
pos
,
"Function signature does not match previous declaration"
)
else
:
entry
=
self
.
declare
(
name
,
cname
,
type
,
pos
,
visibility
)
if
type
.
is_cfunction
and
not
defining
:
entry
.
is_inherited
=
1
entry
.
is_variable
=
1
entry
.
is_cfunction
=
type
.
is_cfunction
if
type
.
is_cfunction
and
self
.
type
:
...
...
@@ -2463,7 +2465,8 @@ class CppClassScope(Scope):
if
base_entry
and
not
base_entry
.
type
.
nogil
:
error
(
pos
,
"Constructor cannot be called without GIL unless all base constructors can also be called without GIL"
)
error
(
base_entry
.
pos
,
"Base constructor defined here."
)
prev_entry
=
self
.
lookup_here
(
name
)
# The previous entries management is now done directly in Scope.declare
#prev_entry = self.lookup_here(name)
entry
=
self
.
declare_var
(
name
,
type
,
pos
,
defining
=
defining
,
cname
=
cname
,
visibility
=
visibility
)
...
...
This diff is collapsed.
Click to expand it.
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