You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//#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
#defineMP_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
inlineboolMP_OBJ_IS_TYPE(mp_const_obj_to, constmp_obj_type_t*t) { return (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
inlineboolMP_OBJ_IS_INT(mp_const_obj_to) { return (MP_OBJ_IS_SMALL_INT(o) ||MP_OBJ_IS_TYPE(o, &mp_type_int)); } // returns true if o is a small int or long int
379
-
inlineboolmp_obj_is_integer(mp_const_obj_to) { returnMP_OBJ_IS_INT(o) ||MP_OBJ_IS_TYPE(o, &mp_type_bool); } // returns true if o is bool, small int or long int
//inline static bool MP_OBJ_IS_TYPE(mp_const_obj_t o, const mp_obj_type_t *t) { return (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
378
+
//inline static bool MP_OBJ_IS_INT(mp_const_obj_t o) { return (MP_OBJ_IS_SMALL_INT(o) || MP_OBJ_IS_TYPE(o, &mp_type_int)); } // returns true if o is a small int or long int
379
+
inlinestaticboolmp_obj_is_integer(mp_const_obj_to) { returnMP_OBJ_IS_INT(o) ||MP_OBJ_IS_TYPE(o, &mp_type_bool); } // returns true if o is bool, small int or long int
0 commit comments