Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
0583e2e4
Commit
0583e2e4
authored
Mar 18, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow unwritable pyc files on this path as well
parent
b92275f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/codegen/parser.cpp
src/codegen/parser.cpp
+6
-5
No files found.
src/codegen/parser.cpp
View file @
0583e2e4
...
...
@@ -1054,7 +1054,10 @@ AST_Module* caching_parse_file(const char* fn) {
code
=
stat
(
cache_fn
.
c_str
(),
&
cache_stat
);
if
(
code
!=
0
||
cache_stat
.
st_mtime
<
source_stat
.
st_mtime
||
(
cache_stat
.
st_mtime
==
source_stat
.
st_mtime
&&
cache_stat
.
st_mtim
.
tv_nsec
<
source_stat
.
st_mtim
.
tv_nsec
))
{
_reparse
(
fn
,
cache_fn
);
auto
result
=
_reparse
(
fn
,
cache_fn
);
if
(
result
==
ParseResult
::
PYC_UNWRITABLE
)
return
parse_file
(
fn
);
code
=
stat
(
cache_fn
.
c_str
(),
&
cache_stat
);
assert
(
code
==
0
);
}
...
...
@@ -1095,11 +1098,9 @@ AST_Module* caching_parse_file(const char* fn) {
if
(
!
good
)
{
fclose
(
fp
);
auto
result
=
_reparse
(
fn
,
cache_fn
);
if
(
result
==
ParseResult
::
PYC_UNWRITABLE
)
{
if
(
VERBOSITY
())
printf
(
"Unable to write to %s, falling back to non-caching parse
\n
"
,
cache_fn
.
c_str
());
if
(
result
==
ParseResult
::
PYC_UNWRITABLE
)
return
parse_file
(
fn
);
}
code
=
stat
(
cache_fn
.
c_str
(),
&
cache_stat
);
assert
(
code
==
0
);
...
...
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