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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
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
Show 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'):
...
@@ -251,6 +251,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
in_quote
=
False
in_quote
=
False
hash_mark
=
single_q
=
double_q
=
-
1
hash_mark
=
single_q
=
double_q
=
-
1
code_len
=
len
(
code
)
code_len
=
len
(
code
)
quote_type
=
None
while
True
:
while
True
:
if
hash_mark
<
q
:
if
hash_mark
<
q
:
...
@@ -260,7 +261,8 @@ def strip_string_literals(code, prefix='__Pyx_L'):
...
@@ -260,7 +261,8 @@ def strip_string_literals(code, prefix='__Pyx_L'):
if
double_q
<
q
:
if
double_q
<
q
:
double_q
=
code
.
find
(
'"'
,
q
)
double_q
=
code
.
find
(
'"'
,
q
)
q
=
min
(
single_q
,
double_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.
# We're done.
if
q
==
-
1
and
hash_mark
==
-
1
:
if
q
==
-
1
and
hash_mark
==
-
1
:
...
@@ -276,7 +278,8 @@ def strip_string_literals(code, prefix='__Pyx_L'):
...
@@ -276,7 +278,8 @@ def strip_string_literals(code, prefix='__Pyx_L'):
if
k
%
2
==
0
:
if
k
%
2
==
0
:
q
+=
1
q
+=
1
continue
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
counter
+=
1
label
=
"%s%s_"
%
(
prefix
,
counter
)
label
=
"%s%s_"
%
(
prefix
,
counter
)
literals
[
label
]
=
code
[
start
+
quote_len
:
q
]
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