diff options
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index d561f80790..27ec5dd3ef 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -49,6 +49,25 @@ // values below. /*****************************************************************************/ +/* Object representation */ + +// A Micro Python object is a machine word having the following form: +// - xxxx...xxx1 : a small int, bits 1 and above are the value +// - xxxx...xx10 : a qstr, bits 2 and above are the value +// - xxxx...xx00 : a pointer to an mp_obj_base_t (unless a fake object) +#define MICROPY_OBJ_REPR_A (0) + +// A Micro Python object is a machine word having the following form: +// - xxxx...xx01 : a small int, bits 2 and above are the value +// - xxxx...xx11 : a qstr, bits 2 and above are the value +// - xxxx...xxx0 : a pointer to an mp_obj_base_t (unless a fake object) +#define MICROPY_OBJ_REPR_B (1) + +#ifndef MICROPY_OBJ_REPR +#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_A) +#endif + +/*****************************************************************************/ /* Memory allocation policy */ // Number of words allocated (in BSS) to the GC stack (minimum is 1) |