summaryrefslogtreecommitdiffstatshomepage
path: root/py/builtineval.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/builtineval.c')
-rw-r--r--py/builtineval.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/py/builtineval.c b/py/builtineval.c
index c7bd6b6298..67072a0fa7 100644
--- a/py/builtineval.c
+++ b/py/builtineval.c
@@ -8,6 +8,7 @@
#include "nlr.h"
#include "misc.h"
#include "mpconfig.h"
+#include "qstr.h"
#include "lexer.h"
#include "lexerunix.h"
#include "parse.h"
@@ -19,10 +20,11 @@
#include "builtin.h"
static mp_obj_t mp_builtin_eval(mp_obj_t o_in) {
- const char *str = qstr_str(mp_obj_get_qstr(o_in));
+ uint str_len;
+ const byte *str = qstr_data(mp_obj_get_qstr(o_in), &str_len);
// create the lexer
- mp_lexer_t *lex = mp_lexer_new_from_str_len("<string>", str, strlen(str), 0);
+ mp_lexer_t *lex = mp_lexer_new_from_str_len("<string>", (const char*)str, str_len, 0);
// parse the string
qstr parse_exc_id;