summaryrefslogtreecommitdiffstatshomepage
path: root/py/modmicropython.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-07-18 22:30:22 +1000
committerDamien George <damien.p.george@gmail.com>2017-07-18 22:30:22 +1000
commitcadbd7f3e62488fb3c62cd35f53530e8fdb8cfea (patch)
tree16e92f83408a01ccbfc25821186c4cabdb8b46b5 /py/modmicropython.c
parent3235b95f087751f54c5531e24033e802be199d7c (diff)
downloadmicropython-cadbd7f3e62488fb3c62cd35f53530e8fdb8cfea.tar.gz
micropython-cadbd7f3e62488fb3c62cd35f53530e8fdb8cfea.zip
py/modmicropython: Cast stack_limit value so it prints correctly.
Without this cast the print will give a wrong result on nan-boxing builds.
Diffstat (limited to 'py/modmicropython.c')
-rw-r--r--py/modmicropython.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/modmicropython.c b/py/modmicropython.c
index d767062301..46a3922e6d 100644
--- a/py/modmicropython.c
+++ b/py/modmicropython.c
@@ -72,7 +72,8 @@ mp_obj_t mp_micropython_mem_info(size_t n_args, const mp_obj_t *args) {
(mp_uint_t)m_get_total_bytes_allocated(), (mp_uint_t)m_get_current_bytes_allocated(), (mp_uint_t)m_get_peak_bytes_allocated());
#endif
#if MICROPY_STACK_CHECK
- mp_printf(&mp_plat_print, "stack: " UINT_FMT " out of " INT_FMT "\n", mp_stack_usage(), MP_STATE_THREAD(stack_limit));
+ mp_printf(&mp_plat_print, "stack: " UINT_FMT " out of " UINT_FMT "\n",
+ mp_stack_usage(), (mp_uint_t)MP_STATE_THREAD(stack_limit));
#else
mp_printf(&mp_plat_print, "stack: " UINT_FMT "\n", mp_stack_usage());
#endif