mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
objsingleton: New home for Ellipsis and NotImplemented.
Having NotImplemented as MP_OBJ_SENTINEL turned out to be problematic (it needs to be checked for in a lot of places, otherwise it'll crash as would pass MP_OBJ_IS_OBJ()), so made a proper singleton value like Ellipsis, both of them sharing the same type.
This commit is contained in:
3
py/obj.h
3
py/obj.h
@@ -449,7 +449,8 @@ extern const struct _mp_obj_bool_t mp_const_false_obj;
|
||||
extern const struct _mp_obj_bool_t mp_const_true_obj;
|
||||
extern const struct _mp_obj_str_t mp_const_empty_bytes_obj;
|
||||
extern const struct _mp_obj_tuple_t mp_const_empty_tuple_obj;
|
||||
extern const struct _mp_obj_ellipsis_t mp_const_ellipsis_obj;
|
||||
extern const struct _mp_obj_singleton_t mp_const_ellipsis_obj;
|
||||
extern const struct _mp_obj_singleton_t mp_const_notimplemented_obj;
|
||||
extern const struct _mp_obj_exception_t mp_const_MemoryError_obj;
|
||||
extern const struct _mp_obj_exception_t mp_const_GeneratorExit_obj;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user