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
7868a281
Commit
7868a281
authored
Apr 26, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code streamlining
parent
62d77b27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Cython/Compiler/Annotate.py
Cython/Compiler/Annotate.py
+5
-3
No files found.
Cython/Compiler/Annotate.py
View file @
7868a281
...
...
@@ -140,8 +140,10 @@ body { font-family: courier; font-size: 12; }
def
_save_annotation_body
(
self
,
lines
,
code_source_file
,
c_file
=
None
):
outlist
=
[]
pos_comment_marker
=
u'/*
\
N{HORIZONTAL ELLIPSIS}
*/
\
n
'
zero_calls
=
dict
((
name
,
0
)
for
name
in
'refnanny py_macro_api py_c_api pyx_macro_api pyx_c_api error_goto'
.
split
())
new_calls_map
=
dict
(
(
name
,
0
)
for
name
in
'refnanny py_macro_api py_c_api pyx_macro_api pyx_c_api error_goto'
.
split
()
).
copy
self
.
mark_pos
(
None
)
...
...
@@ -163,7 +165,7 @@ body { font-family: courier; font-size: 12; }
code
=
code
[
len
(
pos_comment_marker
):]
code
=
html_escape
(
code
)
calls
=
zero_calls
.
copy
()
calls
=
new_calls_map
()
code
=
_parse_code
(
annotate
,
code
)
score
=
(
5
*
calls
[
'py_c_api'
]
+
2
*
calls
[
'pyx_c_api'
]
+
calls
[
'py_macro_api'
]
+
calls
[
'pyx_macro_api'
])
...
...
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