From 41fceae559ff2272a88441dbf531232f173ccbd6 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 15 Aug 2016 10:56:55 +1000 Subject: [PATCH] py/obj.h: For obj reprs A,B,C use void* explicitly for mp_obj_t typedef. The machine_ptr_t type is long obsolete as the type of mp_obj_t is now defined by the object representation, ie by MICROPY_OBJ_REPR. So just use void* explicitly for the typedef of mp_obj_t. If a port wants to use something different then they should define a new object representation. --- py/obj.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/py/obj.h b/py/obj.h index 82abbac90d..22aa196fd1 100644 --- a/py/obj.h +++ b/py/obj.h @@ -31,15 +31,15 @@ #include "py/qstr.h" #include "py/mpprint.h" -// All Micro Python objects are at least this type -// The bit-size must be at least pointer size - +// This is the definition of the opaque MicroPython object type. +// All concrete objects have an encoding within this type and the +// particular encoding is specified by MICROPY_OBJ_REPR. #if MICROPY_OBJ_REPR == MICROPY_OBJ_REPR_D typedef uint64_t mp_obj_t; typedef uint64_t mp_const_obj_t; #else -typedef machine_ptr_t mp_obj_t; -typedef machine_const_ptr_t mp_const_obj_t; +typedef void *mp_obj_t; +typedef const void *mp_const_obj_t; #endif // This mp_obj_type_t struct is a concrete MicroPython object which holds info