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
14f8ffd2
Commit
14f8ffd2
authored
May 29, 2019
by
gsamain
Committed by
Xavier Thompson
Jun 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean cppclass <init> management
parent
22cb8452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+4
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-5
No files found.
Cython/Compiler/PyrexTypes.py
View file @
14f8ffd2
...
...
@@ -4027,7 +4027,10 @@ class CppClassType(CType):
break
func_type
=
CFuncType
(
self
,
[],
exception_check
=
'+'
,
nogil
=
nogil
)
return
self
.
scope
.
declare_cfunction
(
u'<init>'
,
func_type
,
pos
)
entry
=
self
.
scope
.
declare_cfunction
(
u'<init>'
,
func_type
,
pos
)
# This flag is set in order to be able to override this default __init__ by a user-defined one
entry
.
is_inherited
=
1
return
entry
def
check_nullary_constructor
(
self
,
pos
,
msg
=
"stack allocated"
):
constructor
=
self
.
scope
.
lookup
(
u'<init>'
)
...
...
Cython/Compiler/Symtab.py
View file @
14f8ffd2
...
...
@@ -485,11 +485,7 @@ class Scope(object):
if
type
.
is_cfunction
and
old_entry
.
type
.
is_cfunction
and
self
.
is_cpp_class_scope
:
for
index
,
alt_entry
in
enumerate
(
old_entry
.
all_alternatives
()):
if
type
.
compatible_signature_with
(
alt_entry
.
type
):
if
name
==
'<init>'
and
not
type
.
args
:
# Cython pre-declares the no-args constructor - allow later user definitions.
old_index
=
index
cpp_override_allowed
=
True
elif
alt_entry
.
is_inherited
:
if
alt_entry
.
is_inherited
:
old_index
=
index
cpp_override_allowed
=
True
break
...
...
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