py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.
This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
diff --git a/py/mpstate.h b/py/mpstate.h
index 78f497e..d0baad2 100644
--- a/py/mpstate.h
+++ b/py/mpstate.h
@@ -109,7 +109,7 @@
// current exception being handled, for sys.exc_info()
#if MICROPY_PY_SYS_EXC_INFO
- mp_obj_t cur_exception;
+ mp_obj_base_t *cur_exception;
#endif
// dictionary for the __main__ module