mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 14:20:39 +01:00
[python] Upgrade to micropython 1.11
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user