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
91a18881
Commit
91a18881
authored
Jun 24, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert to previous behavior of declaring classes with vtab slots last.
parent
24f76ac6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+5
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
91a18881
...
@@ -417,6 +417,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -417,6 +417,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
return
(
vtab_list
,
vtabslot_list
)
return
(
vtab_list
,
vtabslot_list
)
def
generate_type_definitions
(
self
,
env
,
modules
,
vtab_list
,
vtabslot_list
,
code
):
def
generate_type_definitions
(
self
,
env
,
modules
,
vtab_list
,
vtabslot_list
,
code
):
# TODO: Why are these separated out?
for
entry
in
vtabslot_list
:
self
.
generate_objstruct_predeclaration
(
entry
.
type
,
code
)
vtabslot_entries
=
set
(
vtabslot_list
)
vtabslot_entries
=
set
(
vtabslot_list
)
for
module
in
modules
:
for
module
in
modules
:
definition
=
module
is
env
definition
=
module
is
env
...
@@ -427,8 +430,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -427,8 +430,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
for
entry
in
module
.
type_entries
:
for
entry
in
module
.
type_entries
:
if
entry
.
defined_in_pxd
:
if
entry
.
defined_in_pxd
:
type_entries
.
append
(
entry
)
type_entries
.
append
(
entry
)
type_entries
=
[
t
for
t
in
type_entries
if
t
not
in
vtabslot_entries
]
self
.
generate_type_header_code
(
type_entries
,
code
)
self
.
generate_type_header_code
(
type_entries
,
code
)
for
entry
in
vtabslot_list
:
for
entry
in
vtabslot_list
:
self
.
generate_objstruct_definition
(
entry
.
type
,
code
)
self
.
generate_typeobj_predeclaration
(
entry
,
code
)
self
.
generate_typeobj_predeclaration
(
entry
,
code
)
for
entry
in
vtab_list
:
for
entry
in
vtab_list
:
self
.
generate_typeobj_predeclaration
(
entry
,
code
)
self
.
generate_typeobj_predeclaration
(
entry
,
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