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
52f8f566
Commit
52f8f566
authored
Mar 14, 2017
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
esp8266: Update lexer constructors so they can raise exceptions.
parent
180045bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
esp8266/lexerstr32.c
esp8266/lexerstr32.c
+1
-4
esp8266/main.c
esp8266/main.c
+2
-1
No files found.
esp8266/lexerstr32.c
View file @
52f8f566
...
...
@@ -58,10 +58,7 @@ STATIC void str32_buf_free(void *sb_in) {
}
mp_lexer_t
*
mp_lexer_new_from_str32
(
qstr
src_name
,
const
char
*
str
,
mp_uint_t
len
,
mp_uint_t
free_len
)
{
mp_lexer_str32_buf_t
*
sb
=
m_new_obj_maybe
(
mp_lexer_str32_buf_t
);
if
(
sb
==
NULL
)
{
return
NULL
;
}
mp_lexer_str32_buf_t
*
sb
=
m_new_obj
(
mp_lexer_str32_buf_t
);
sb
->
byte_off
=
(
uint32_t
)
str
&
3
;
sb
->
src_cur
=
(
uint32_t
*
)(
str
-
sb
->
byte_off
);
sb
->
val
=
*
sb
->
src_cur
++
>>
sb
->
byte_off
*
8
;
...
...
esp8266/main.c
View file @
52f8f566
...
...
@@ -32,6 +32,7 @@
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
#include "py/mperrno.h"
#include "py/mphal.h"
#include "py/gc.h"
#include "lib/mp-readline/readline.h"
...
...
@@ -111,7 +112,7 @@ void user_init(void) {
#if !MICROPY_VFS
mp_lexer_t
*
mp_lexer_new_from_file
(
const
char
*
filename
)
{
return
NULL
;
mp_raise_OSError
(
MP_ENOENT
)
;
}
mp_import_stat_t
mp_import_stat
(
const
char
*
path
)
{
...
...
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