Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Kirill Smelkov
gevent
Commits
9cfd32e9
Commit
9cfd32e9
authored
Nov 23, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a dangling open file is cythoncpp preventing a build on windows with pypy
parent
2cc3357f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
util/cythonpp.py
util/cythonpp.py
+29
-29
No files found.
util/cythonpp.py
View file @
9cfd32e9
...
...
@@ -526,11 +526,11 @@ class Str_sourceline(str):
def
atomic_write
(
filename
,
data
):
tmpname
=
filename
+
'.tmp.%s'
%
os
.
getpid
()
f
=
open
(
tmpname
,
'w'
)
f
.
write
(
data
)
f
.
flush
()
os
.
fsync
(
f
.
fileno
())
f
.
close
()
with
open
(
tmpname
,
'w'
)
as
f
:
f
.
write
(
data
)
f
.
flush
()
os
.
fsync
(
f
.
fileno
())
if
os
.
path
.
exists
(
filename
):
os
.
unlink
(
filename
)
os
.
rename
(
tmpname
,
filename
)
...
...
@@ -571,35 +571,35 @@ def postprocess_cython_output(filename, banner):
# confuse merger
result
=
[
'/* %s */
\
n
'
%
(
banner
)]
input
=
open
(
filename
)
firstline
=
input
.
readline
()
with
open
(
filename
)
as
finput
:
firstline
=
f
input
.
readline
()
m
=
cython_header_re
.
match
(
firstline
.
strip
())
if
m
:
result
.
append
(
'/* %s */'
%
m
.
group
(
1
))
else
:
result
.
append
(
firstline
)
m
=
cython_header_re
.
match
(
firstline
.
strip
())
if
m
:
result
.
append
(
'/* %s */'
%
m
.
group
(
1
))
else
:
result
.
append
(
firstline
)
in_comment
=
False
for
line
in
input
:
in_comment
=
False
for
line
in
f
input
:
if
line
.
endswith
(
'
\
n
'
):
line
=
line
[:
-
1
].
rstrip
()
+
'
\
n
'
if
line
.
endswith
(
'
\
n
'
):
line
=
line
[:
-
1
].
rstrip
()
+
'
\
n
'
if
in_comment
:
if
'*/'
in
line
:
in_comment
=
False
result
.
append
(
line
)
else
:
result
.
append
(
line
.
replace
(
'
\
n
'
,
newline_token
))
else
:
if
line
.
lstrip
().
startswith
(
'/* '
)
and
'*/'
not
in
line
:
line
=
line
.
lstrip
()
# cython adds space before /* for some reason
line
=
line
.
replace
(
'
\
n
'
,
newline_token
)
result
.
append
(
line
)
in_comment
=
True
if
in_comment
:
if
'*/'
in
line
:
in_comment
=
False
result
.
append
(
line
)
else
:
result
.
append
(
line
.
replace
(
'
\
n
'
,
newline_token
))
else
:
result
.
append
(
line
)
if
line
.
lstrip
().
startswith
(
'/* '
)
and
'*/'
not
in
line
:
line
=
line
.
lstrip
()
# cython adds space before /* for some reason
line
=
line
.
replace
(
'
\
n
'
,
newline_token
)
result
.
append
(
line
)
in_comment
=
True
else
:
result
.
append
(
line
)
return
''
.
join
(
result
)
...
...
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