diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-26 17:41:46 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-26 17:41:46 +0000 |
commit | 5bd56fbf132585ece9ac5d5a72d569f62fe4a42c (patch) | |
tree | c50675c0d809f52190dde7e30382e5cb37879038 /py/obj.h | |
parent | 75abee206d1a575aa98a486d043c94d64df432c1 (diff) | |
parent | 4795c58f3cfacb20e3b991fec7b78d59a8dcabff (diff) | |
download | micropython-5bd56fbf132585ece9ac5d5a72d569f62fe4a42c.tar.gz micropython-5bd56fbf132585ece9ac5d5a72d569f62fe4a42c.zip |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -40,6 +40,7 @@ typedef struct _mp_obj_base_t mp_obj_base_t; #define MP_OBJ_IS_QSTR(o) ((((mp_small_int_t)(o)) & 3) == 2) #define MP_OBJ_IS_OBJ(o) ((((mp_small_int_t)(o)) & 3) == 0) #define MP_OBJ_IS_TYPE(o, t) (MP_OBJ_IS_OBJ(o) && (((mp_obj_base_t*)(o))->type == (t))) // this does not work for checking a string, use below macro for that +#define MP_OBJ_IS_INT(o) (MP_OBJ_IS_SMALL_INT(o) || MP_OBJ_IS_TYPE(o, &int_type)) #define MP_OBJ_IS_STR(o) (MP_OBJ_IS_QSTR(o) || MP_OBJ_IS_TYPE(o, &str_type)) #define MP_OBJ_SMALL_INT_VALUE(o) (((mp_small_int_t)(o)) >> 1) |