fix definition of slice type with optional "make_new"

This commit is contained in:
Jeff Epler 2023-09-22 13:56:36 -05:00
parent e48984872b
commit 99479a69f8
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -128,11 +128,18 @@ STATIC MP_DEFINE_CONST_DICT(slice_locals_dict, slice_locals_dict_table);
#define SLICE_TYPE_ATTR_OR_LOCALS_DICT
#endif
#if MICROPY_PY_BUILTINS_SLICE_INDICES || MICROPY_PY_BUILTINS_SLICE_ATTRS
#define SLICE_MAKE_NEW make_new, slice_make_new,
#else
#define SLICE_MAKE_NEW
#endif
MP_DEFINE_CONST_OBJ_TYPE(
mp_type_slice,
MP_QSTR_slice,
MP_TYPE_FLAG_NONE,
SLICE_TYPE_ATTR_OR_LOCALS_DICT
SLICE_MAKE_NEW
print, slice_print
);