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
d9db5fb0
Commit
d9db5fb0
authored
Oct 11, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformat some code
parent
54961a30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
Cython/Compiler/UtilityCode.py
Cython/Compiler/UtilityCode.py
+6
-9
No files found.
Cython/Compiler/UtilityCode.py
View file @
d9db5fb0
...
@@ -30,12 +30,11 @@ class NonManglingModuleScope(Symtab.ModuleScope):
...
@@ -30,12 +30,11 @@ class NonManglingModuleScope(Symtab.ModuleScope):
else
:
else
:
return
Symtab
.
ModuleScope
.
mangle
(
self
,
prefix
)
return
Symtab
.
ModuleScope
.
mangle
(
self
,
prefix
)
class
CythonUtilityCodeContext
(
StringParseContext
):
class
CythonUtilityCodeContext
(
StringParseContext
):
scope
=
None
scope
=
None
def
find_module
(
self
,
module_name
,
relative_to
=
None
,
pos
=
None
,
def
find_module
(
self
,
module_name
,
relative_to
=
None
,
pos
=
None
,
need_pxd
=
True
):
need_pxd
=
1
):
if
module_name
!=
self
.
module_name
:
if
module_name
!=
self
.
module_name
:
if
module_name
not
in
self
.
modules
:
if
module_name
not
in
self
.
modules
:
raise
AssertionError
(
"Only the cython cimport is supported."
)
raise
AssertionError
(
"Only the cython cimport is supported."
)
...
@@ -43,10 +42,8 @@ class CythonUtilityCodeContext(StringParseContext):
...
@@ -43,10 +42,8 @@ class CythonUtilityCodeContext(StringParseContext):
return
self
.
modules
[
module_name
]
return
self
.
modules
[
module_name
]
if
self
.
scope
is
None
:
if
self
.
scope
is
None
:
self
.
scope
=
NonManglingModuleScope
(
self
.
prefix
,
self
.
scope
=
NonManglingModuleScope
(
module_name
,
self
.
prefix
,
module_name
,
parent_module
=
None
,
context
=
self
)
parent_module
=
None
,
context
=
self
)
return
self
.
scope
return
self
.
scope
...
@@ -101,8 +98,8 @@ class CythonUtilityCode(Code.UtilityCodeBase):
...
@@ -101,8 +98,8 @@ class CythonUtilityCode(Code.UtilityCodeBase):
context
.
prefix
=
self
.
prefix
context
.
prefix
=
self
.
prefix
context
.
cython_scope
=
cython_scope
context
.
cython_scope
=
cython_scope
#context = StringParseContext(self.name)
#context = StringParseContext(self.name)
tree
=
parse_from_strings
(
self
.
name
,
self
.
impl
,
context
=
context
,
tree
=
parse_from_strings
(
allow_struct_enum_decorator
=
True
)
self
.
name
,
self
.
impl
,
context
=
context
,
allow_struct_enum_decorator
=
True
)
pipeline
=
Pipeline
.
create_pipeline
(
context
,
'pyx'
,
exclude_classes
=
excludes
)
pipeline
=
Pipeline
.
create_pipeline
(
context
,
'pyx'
,
exclude_classes
=
excludes
)
if
entries_only
:
if
entries_only
:
...
...
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