Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
97142000
Commit
97142000
authored
Mar 14, 2017
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpy-cross/main: Move lexer constructor to within NLR handler block.
parent
68e1c4f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
mpy-cross/main.c
mpy-cross/main.c
+2
-6
No files found.
mpy-cross/main.c
View file @
97142000
...
...
@@ -57,14 +57,10 @@ STATIC void stderr_print_strn(void *env, const char *str, mp_uint_t len) {
STATIC
const
mp_print_t
mp_stderr_print
=
{
NULL
,
stderr_print_strn
};
STATIC
int
compile_and_save
(
const
char
*
file
,
const
char
*
output_file
,
const
char
*
source_file
)
{
mp_lexer_t
*
lex
=
mp_lexer_new_from_file
(
file
);
if
(
lex
==
NULL
)
{
printf
(
"could not open file '%s' for reading
\n
"
,
file
);
return
1
;
}
nlr_buf_t
nlr
;
if
(
nlr_push
(
&
nlr
)
==
0
)
{
mp_lexer_t
*
lex
=
mp_lexer_new_from_file
(
file
);
qstr
source_name
;
if
(
source_file
==
NULL
)
{
source_name
=
lex
->
source_name
;
...
...
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