Skip to content

Commit 41fceae

Browse files
committed
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.
1 parent b359cf2 commit 41fceae

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

py/obj.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
#include "py/qstr.h"
3232
#include "py/mpprint.h"
3333

34-
// All Micro Python objects are at least this type
35-
// The bit-size must be at least pointer size
36-
34+
// This is the definition of the opaque MicroPython object type.
35+
// All concrete objects have an encoding within this type and the
36+
// particular encoding is specified by MICROPY_OBJ_REPR.
3737
#if MICROPY_OBJ_REPR == MICROPY_OBJ_REPR_D
3838
typedef uint64_t mp_obj_t;
3939
typedef uint64_t mp_const_obj_t;
4040
#else
41-
typedef machine_ptr_t mp_obj_t;
42-
typedef machine_const_ptr_t mp_const_obj_t;
41+
typedef void *mp_obj_t;
42+
typedef const void *mp_const_obj_t;
4343
#endif
4444

4545
// This mp_obj_type_t struct is a concrete MicroPython object which holds info

0 commit comments

Comments
 (0)