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
82bdda3a
Commit
82bdda3a
authored
Oct 09, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
e505c27a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+5
-2
No files found.
Cython/Build/Dependencies.py
View file @
82bdda3a
...
...
@@ -251,6 +251,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
in_quote
=
False
hash_mark
=
single_q
=
double_q
=
-
1
code_len
=
len
(
code
)
quote_type
=
None
while
True
:
if
hash_mark
<
q
:
...
...
@@ -260,7 +261,8 @@ def strip_string_literals(code, prefix='__Pyx_L'):
if
double_q
<
q
:
double_q
=
code
.
find
(
'"'
,
q
)
q
=
min
(
single_q
,
double_q
)
if
q
==
-
1
:
q
=
max
(
single_q
,
double_q
)
if
q
==
-
1
:
q
=
max
(
single_q
,
double_q
)
# We're done.
if
q
==
-
1
and
hash_mark
==
-
1
:
...
...
@@ -276,7 +278,8 @@ def strip_string_literals(code, prefix='__Pyx_L'):
if
k
%
2
==
0
:
q
+=
1
continue
if
code
[
q
]
==
quote_type
and
(
quote_len
==
1
or
(
code_len
>
q
+
2
and
quote_type
==
code
[
q
+
1
]
==
code
[
q
+
2
])):
if
code
[
q
]
==
quote_type
and
(
quote_len
==
1
or
(
code_len
>
q
+
2
and
quote_type
==
code
[
q
+
1
]
==
code
[
q
+
2
])):
counter
+=
1
label
=
"%s%s_"
%
(
prefix
,
counter
)
literals
[
label
]
=
code
[
start
+
quote_len
:
q
]
...
...
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