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
38ca41a3
Commit
38ca41a3
authored
Feb 14, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forbid inheritance between PyExt and CyExt
parent
8dd69721
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+6
-0
No files found.
Cython/Compiler/Nodes.py
View file @
38ca41a3
...
...
@@ -4840,6 +4840,12 @@ class CClassDefNode(ClassDefNode):
base_type
.
name
in
(
'tuple'
,
'str'
,
'bytes'
):
error
(
base
.
pos
,
"inheritance from PyVarObject types like '%s' is not currently supported"
%
base_type
.
name
)
elif
base_type
.
is_extension_type
and
(
base_type
.
nogil
!=
self
.
nogil
):
error
(
base
.
pos
,
"""
inheritance between PyExtensionType and CythonExtensionType is not currently supported
(trying to make %s inherit from %s)
"""
%
(
self
.
class_name
,
base_type
.
name
))
else
:
self
.
base_type
=
base_type
if
env
.
directives
.
get
(
'freelist'
,
0
)
>
0
and
base_type
!=
PyrexTypes
.
py_object_type
:
...
...
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