[python] Upgrade to micropython 1.11

This commit is contained in:
Léa Saviot
2019-08-21 09:59:33 +02:00
parent 127a166762
commit 0975ba0f10
115 changed files with 4605 additions and 2450 deletions

View File

@@ -4,6 +4,7 @@
* The MIT License (MIT)
*
* Copyright (c) 2014 Damien P. George
* Copyright (c) 2015-2018 Paul Sokolovsky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -32,10 +33,15 @@
#if MICROPY_WARNINGS
void mp_warning(const char *msg, ...) {
void mp_warning(const char *category, const char *msg, ...) {
if (category == NULL) {
category = "Warning";
}
mp_print_str(MICROPY_ERROR_PRINTER, category);
mp_print_str(MICROPY_ERROR_PRINTER, ": ");
va_list args;
va_start(args, msg);
mp_print_str(MICROPY_ERROR_PRINTER, "Warning: ");
mp_vprintf(MICROPY_ERROR_PRINTER, msg, args);
mp_print_str(MICROPY_ERROR_PRINTER, "\n");
va_end(args);
@@ -43,7 +49,7 @@ void mp_warning(const char *msg, ...) {
void mp_emitter_warning(pass_kind_t pass, const char *msg) {
if (pass == MP_PASS_CODE_SIZE) {
mp_warning(msg, NULL);
mp_warning(NULL, msg);
}
}