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
81bd573a
Commit
81bd573a
authored
Jul 19, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py23 compatibility
parent
9467c481
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Cython/Compiler/Pipeline.py
Cython/Compiler/Pipeline.py
+2
-2
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+9
-1
No files found.
Cython/Compiler/Pipeline.py
View file @
81bd573a
...
@@ -214,8 +214,8 @@ def create_py_pipeline(context, options, result):
...
@@ -214,8 +214,8 @@ def create_py_pipeline(context, options, result):
return
create_pyx_pipeline
(
context
,
options
,
result
,
py
=
True
)
return
create_pyx_pipeline
(
context
,
options
,
result
,
py
=
True
)
def
create_pyx_as_pxd_pipeline
(
context
,
result
):
def
create_pyx_as_pxd_pipeline
(
context
,
result
):
from
ParseTreeTransforms
import
(
AlignFunctionDefinitions
,
from
ParseTreeTransforms
import
AlignFunctionDefinitions
,
\
MarkClosureVisitor
,
WithTransform
,
AnalyseDeclarationsTransform
)
MarkClosureVisitor
,
WithTransform
,
AnalyseDeclarationsTransform
from
Optimize
import
ConstantFolding
,
FlattenInListTransform
from
Optimize
import
ConstantFolding
,
FlattenInListTransform
from
Nodes
import
StatListNode
from
Nodes
import
StatListNode
pipeline
=
[]
pipeline
=
[]
...
...
Cython/Compiler/Symtab.py
View file @
81bd573a
...
@@ -285,6 +285,9 @@ class Scope(object):
...
@@ -285,6 +285,9 @@ class Scope(object):
entries = [(name, entry)
entries = [(name, entry)
for name, entry in other.entries.iteritems()
for name, entry in other.entries.iteritems()
if entry.used or merge_unused]
if entry.used or merge_unused]
# !@#$ py23
entries = dict(entries)
self.entries.update(entries)
self.entries.update(entries)
for attr in ('const_entries',
for attr in ('const_entries',
...
@@ -950,7 +953,12 @@ class ModuleScope(Scope):
...
@@ -950,7 +953,12 @@ class ModuleScope(Scope):
entry = self.lookup_here(name)
entry = self.lookup_here(name)
if entry is not None:
if entry is not None:
return entry
return entry
language_level = self.context.language_level if self.context is not None else 3
if self.context is not None:
language_level = self.context.language_level
else:
language_level = 3
return self.outer_scope.lookup(name, language_level=language_level)
return self.outer_scope.lookup(name, language_level=language_level)
def declare_builtin(self, name, pos):
def declare_builtin(self, name, pos):
...
...
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