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
Boxiang Sun
cython
Commits
cf2ffbcc
Commit
cf2ffbcc
authored
Nov 07, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup.
parent
c2e7b11e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
169 deletions
+169
-169
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+168
-168
No files found.
Cython/Compiler/ModuleNode.py
View file @
cf2ffbcc
Cython/Compiler/Nodes.py
View file @
cf2ffbcc
...
@@ -4593,14 +4593,13 @@ class CClassDefNode(ClassDefNode):
...
@@ -4593,14 +4593,13 @@ class CClassDefNode(ClassDefNode):
base_type
=
base
.
analyse_as_type
(
env
)
base_type
=
base
.
analyse_as_type
(
env
)
if
base_type
in
(
PyrexTypes
.
c_int_type
,
PyrexTypes
.
c_long_type
,
PyrexTypes
.
c_float_type
):
if
base_type
in
(
PyrexTypes
.
c_int_type
,
PyrexTypes
.
c_long_type
,
PyrexTypes
.
c_float_type
):
# Use the Python rather than C variant of these types.
# Use the Python rather than C variant of these types.
base_type
=
env
.
lookup
(
str
(
base_type
)).
type
base_type
=
env
.
lookup
(
base_type
.
sign_and_name
(
)).
type
if
base_type
is
None
:
if
base_type
is
None
:
error
(
base
.
pos
,
"First base of '%s' is not an extension type"
%
self
.
class_name
)
error
(
base
.
pos
,
"First base of '%s' is not an extension type"
%
self
.
class_name
)
elif
base_type
==
PyrexTypes
.
py_object_type
:
elif
base_type
==
PyrexTypes
.
py_object_type
:
base_class_scope
=
None
base_class_scope
=
None
elif
not
base_type
.
is_extension_type
and
\
elif
not
base_type
.
is_extension_type
and
\
not
(
base_type
.
is_builtin_type
and
base_type
.
objstruct_cname
):
not
(
base_type
.
is_builtin_type
and
base_type
.
objstruct_cname
):
print
(
base_type
,
base_type
.
is_builtin_type
)
error
(
base
.
pos
,
"'%s' is not an extension type"
%
base_type
)
error
(
base
.
pos
,
"'%s' is not an extension type"
%
base_type
)
elif
not
base_type
.
is_complete
():
elif
not
base_type
.
is_complete
():
error
(
base
.
pos
,
"Base class '%s' of type '%s' is incomplete"
%
(
error
(
base
.
pos
,
"Base class '%s' of type '%s' is incomplete"
%
(
...
@@ -4691,7 +4690,7 @@ class CClassDefNode(ClassDefNode):
...
@@ -4691,7 +4690,7 @@ class CClassDefNode(ClassDefNode):
from
.
import
ExprNodes
from
.
import
ExprNodes
self
.
type_init_args
=
ExprNodes
.
TupleNode
(
self
.
type_init_args
=
ExprNodes
.
TupleNode
(
self
.
pos
,
self
.
pos
,
args
=
[
ExprNodes
.
StringNode
(
self
.
pos
,
value
=
self
.
class_name
),
args
=
[
ExprNodes
.
Identifier
StringNode
(
self
.
pos
,
value
=
self
.
class_name
),
self
.
bases
,
self
.
bases
,
ExprNodes
.
DictNode
(
self
.
pos
,
key_value_pairs
=
[])])
ExprNodes
.
DictNode
(
self
.
pos
,
key_value_pairs
=
[])])
elif
self
.
base_type
:
elif
self
.
base_type
:
...
@@ -4761,7 +4760,8 @@ class CClassDefNode(ClassDefNode):
...
@@ -4761,7 +4760,8 @@ class CClassDefNode(ClassDefNode):
type
=
entry
.
type
type
=
entry
.
type
typeobj_cname
=
type
.
typeobj_cname
typeobj_cname
=
type
.
typeobj_cname
scope
=
type
.
scope
scope
=
type
.
scope
if
scope
:
# could be None if there was an error
if
not
scope
:
# could be None if there was an error
return
if
entry
.
visibility
!=
'extern'
:
if
entry
.
visibility
!=
'extern'
:
for
slot
in
TypeSlots
.
slot_table
:
for
slot
in
TypeSlots
.
slot_table
:
slot
.
generate_dynamic_init_code
(
scope
,
code
)
slot
.
generate_dynamic_init_code
(
scope
,
code
)
...
...
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