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
19e88252
Commit
19e88252
authored
May 04, 2013
by
Nikita Nemkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow cdef class decorators in Cython utility code.
parent
54bdaf56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+8
-4
No files found.
Cython/Compiler/Nodes.py
View file @
19e88252
...
@@ -7952,10 +7952,14 @@ class CnameDecoratorNode(StatNode):
...
@@ -7952,10 +7952,14 @@ class CnameDecoratorNode(StatNode):
def
analyse_declarations
(
self
,
env
):
def
analyse_declarations
(
self
,
env
):
self
.
node
.
analyse_declarations
(
env
)
self
.
node
.
analyse_declarations
(
env
)
self
.
is_function
=
isinstance
(
self
.
node
,
FuncDefNode
)
node
=
self
.
node
is_struct_or_enum
=
isinstance
(
self
.
node
,
(
CStructOrUnionDefNode
,
if
isinstance
(
node
,
CompilerDirectivesNode
):
node
=
node
.
body
.
stats
[
0
]
self
.
is_function
=
isinstance
(
node
,
FuncDefNode
)
is_struct_or_enum
=
isinstance
(
node
,
(
CStructOrUnionDefNode
,
CEnumDefNode
))
CEnumDefNode
))
e
=
self
.
node
.
entry
e
=
node
.
entry
if
self
.
is_function
:
if
self
.
is_function
:
e
.
cname
=
self
.
cname
e
.
cname
=
self
.
cname
...
@@ -7966,7 +7970,7 @@ class CnameDecoratorNode(StatNode):
...
@@ -7966,7 +7970,7 @@ class CnameDecoratorNode(StatNode):
elif
is_struct_or_enum
:
elif
is_struct_or_enum
:
e
.
cname
=
e
.
type
.
cname
=
self
.
cname
e
.
cname
=
e
.
type
.
cname
=
self
.
cname
else
:
else
:
scope
=
self
.
node
.
scope
scope
=
node
.
scope
e
.
cname
=
self
.
cname
e
.
cname
=
self
.
cname
e
.
type
.
objstruct_cname
=
self
.
cname
+
'_obj'
e
.
type
.
objstruct_cname
=
self
.
cname
+
'_obj'
...
...
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