From 451a0870753be89f5a284fd39727705a3ad2109b Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Fri, 5 Dec 2014 22:50:16 +0000
Subject: [PATCH] py: Fix printing of size_t entity; fix qemu-arm for changes
 to lexer.

---
 py/lexer.c      | 2 +-
 qemu-arm/main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/py/lexer.c b/py/lexer.c
index a93d8ad0d..bc1b8babf 100644
--- a/py/lexer.c
+++ b/py/lexer.c
@@ -754,7 +754,7 @@ void mp_lexer_to_next(mp_lexer_t *lex) {
 
 #if MICROPY_DEBUG_PRINTERS
 void mp_lexer_show_token(const mp_lexer_t *lex) {
-    printf("(" UINT_FMT ":" UINT_FMT ") kind:%u str:%p len:%u", lex->tok_line, lex->tok_column, lex->tok_kind, lex->vstr.buf, lex->vstr.len);
+    printf("(" UINT_FMT ":" UINT_FMT ") kind:%u str:%p len:%zu", lex->tok_line, lex->tok_column, lex->tok_kind, lex->vstr.buf, lex->vstr.len);
     if (lex->vstr.len > 0) {
         const byte *i = (const byte *)lex->vstr.buf;
         const byte *j = (const byte *)i + lex->vstr.len;
diff --git a/qemu-arm/main.c b/qemu-arm/main.c
index 1189ae7b8..8cbeaaa6e 100644
--- a/qemu-arm/main.c
+++ b/qemu-arm/main.c
@@ -32,7 +32,7 @@ void do_str(const char *src) {
     }
 
     // parse okay
-    qstr source_name = mp_lexer_source_name(lex);
+    qstr source_name = lex->source_name;
     mp_lexer_free(lex);
     mp_obj_t module_fun = mp_compile(pn, source_name, MP_EMIT_OPT_NONE, true);
 
-- 
GitLab