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.
This commit is contained in:
Damien George 2016-08-15 10:56:55 +10:00
parent b359cf2911
commit 41fceae559

View File

@ -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