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
3e01699c
Commit
3e01699c
authored
May 11, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Analyze fused declaration code in the global scope
parent
804c439c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/FusedNode.py
Cython/Compiler/FusedNode.py
+4
-3
No files found.
Cython/Compiler/FusedNode.py
View file @
3e01699c
...
@@ -360,7 +360,7 @@ class FusedCFuncDefNode(StatListNode):
...
@@ -360,7 +360,7 @@ class FusedCFuncDefNode(StatListNode):
%s
%s
break
break
else:
else:
PyErr_Clear()
__pyx_
PyErr_Clear()
"""
%
self
.
match
)
"""
%
self
.
match
)
def
_buffer_checks
(
self
,
buffer_types
,
pyx_code
,
decl_code
,
env
):
def
_buffer_checks
(
self
,
buffer_types
,
pyx_code
,
decl_code
,
env
):
...
@@ -524,7 +524,7 @@ class FusedCFuncDefNode(StatListNode):
...
@@ -524,7 +524,7 @@ class FusedCFuncDefNode(StatListNode):
decl_code
.
put_chunk
(
decl_code
.
put_chunk
(
u"""
u"""
cdef extern from *:
cdef extern from *:
void
PyErr_Clear
()
void
__pyx_PyErr_Clear "PyErr_Clear"
()
"""
)
"""
)
decl_code
.
indent
()
decl_code
.
indent
()
...
@@ -601,7 +601,8 @@ class FusedCFuncDefNode(StatListNode):
...
@@ -601,7 +601,8 @@ class FusedCFuncDefNode(StatListNode):
# print fragment_code
# print fragment_code
fragment
=
TreeFragment
.
TreeFragment
(
fragment_code
,
level
=
'module'
)
fragment
=
TreeFragment
.
TreeFragment
(
fragment_code
,
level
=
'module'
)
ast
=
TreeFragment
.
SetPosTransform
(
self
.
node
.
pos
)(
fragment
.
root
)
ast
=
TreeFragment
.
SetPosTransform
(
self
.
node
.
pos
)(
fragment
.
root
)
UtilityCode
.
declare_declarations_in_scope
(
decl_code
.
getvalue
(),
env
)
UtilityCode
.
declare_declarations_in_scope
(
decl_code
.
getvalue
(),
env
.
global_scope
())
ast
.
scope
=
env
ast
.
scope
=
env
ast
.
analyse_declarations
(
env
)
ast
.
analyse_declarations
(
env
)
py_func
=
ast
.
stats
[
-
1
]
# the DefNode
py_func
=
ast
.
stats
[
-
1
]
# the DefNode
...
...
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