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
fd9a055d
Commit
fd9a055d
authored
May 29, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean cppclass <init> management
parent
3db844e9
Changes
2
Show 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 @
fd9a055d
...
...
@@ -3882,7 +3882,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 @
fd9a055d
...
...
@@ -456,11 +456,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