Skip to content
Snippets Groups Projects
Commit cadbd7f3 authored by Damien George's avatar Damien George
Browse files

py/modmicropython: Cast stack_limit value so it prints correctly.

Without this cast the print will give a wrong result on nan-boxing builds.
parent 3235b95f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment