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
843c2a69
Commit
843c2a69
authored
Jun 24, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
3e76b40f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+0
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+14
-10
tests/compile/forward.pyx
tests/compile/forward.pyx
+2
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
843c2a69
...
...
@@ -429,7 +429,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
type_entries
.
append
(
entry
)
self
.
generate_type_header_code
(
type_entries
,
code
)
for
entry
in
vtabslot_list
:
# self.generate_objstruct_definition(entry.type, code)
self
.
generate_typeobj_predeclaration
(
entry
,
code
)
for
entry
in
vtab_list
:
self
.
generate_typeobj_predeclaration
(
entry
,
code
)
...
...
Cython/Compiler/Nodes.py
View file @
843c2a69
...
...
@@ -3350,6 +3350,18 @@ class CClassDefNode(ClassDefNode):
decorators
=
None
shadow
=
False
def
buffer_defaults
(
self
,
env
):
if
not
hasattr
(
self
,
'_buffer_defaults'
):
import
Buffer
if
self
.
buffer_defaults_node
:
self
.
_buffer_defaults
=
Buffer
.
analyse_buffer_options
(
self
.
buffer_defaults_pos
,
env
,
[],
self
.
buffer_defaults_node
,
need_complete
=
False
)
else
:
self
.
_buffer_defaults
=
None
return
self
.
_buffer_defaults
def
declare
(
self
,
env
):
if
self
.
module_name
and
self
.
visibility
!=
'extern'
:
module_path
=
self
.
module_name
.
split
(
"."
)
...
...
@@ -3359,14 +3371,6 @@ class CClassDefNode(ClassDefNode):
else
:
home_scope
=
env
import
Buffer
if
self
.
buffer_defaults_node
:
self
.
buffer_defaults
=
Buffer
.
analyse_buffer_options
(
self
.
buffer_defaults_pos
,
env
,
[],
self
.
buffer_defaults_node
,
need_complete
=
False
)
else
:
self
.
buffer_defaults
=
None
self
.
entry
=
home_scope
.
declare_c_class
(
name
=
self
.
class_name
,
pos
=
self
.
pos
,
...
...
@@ -3379,7 +3383,7 @@ class CClassDefNode(ClassDefNode):
visibility
=
self
.
visibility
,
typedef_flag
=
self
.
typedef_flag
,
api
=
self
.
api
,
buffer_defaults
=
self
.
buffer_defaults
,
buffer_defaults
=
self
.
buffer_defaults
(
env
)
,
shadow
=
self
.
shadow
)
def
analyse_declarations
(
self
,
env
):
...
...
@@ -3463,7 +3467,7 @@ class CClassDefNode(ClassDefNode):
visibility
=
self
.
visibility
,
typedef_flag
=
self
.
typedef_flag
,
api
=
self
.
api
,
buffer_defaults
=
self
.
buffer_defaults
,
buffer_defaults
=
self
.
buffer_defaults
(
env
)
,
shadow
=
self
.
shadow
)
if
self
.
shadow
:
home_scope
.
lookup
(
self
.
class_name
).
as_variable
=
self
.
entry
...
...
tests/compile/forward.pyx
View file @
843c2a69
...
...
@@ -16,10 +16,12 @@ cdef struct StructB:
StructB
*
b
cdef
class
ClassA
:
cdef
ClassA
a
cdef
ClassB
b
ctypedef
public
class
ClassB
[
object
ClassB
,
type
TypeB
]:
cdef
ClassA
a
cdef
ClassB
b
cdef
StructA
struct_a
...
...
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