Skip to content

Commit 6c870dc

Browse files
projectgusdpgeorge
authored andcommitted
py/obj: Remove the legacy object API for version 2.
These were changed in v1.11 (2019). Prepare to remove the compatibility macros as part of V2 changes. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent 1473ed4 commit 6c870dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/obj.h

+4
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,8 @@ mp_obj_t mp_seq_extract_slice(const mp_obj_t *seq, mp_bound_slice_t *indexes);
12731273
memmove(((char *)dest) + (beg + slice_len) * (item_sz), ((char *)dest) + (end) * (item_sz), ((dest_len) + (len_adj) - ((beg) + (slice_len))) * (item_sz)); \
12741274
memmove(((char *)dest) + (beg) * (item_sz), slice, slice_len * (item_sz));
12751275

1276+
#if !MICROPY_PREVIEW_VERSION_2
1277+
12761278
// Provide translation for legacy API
12771279
#define MP_OBJ_IS_SMALL_INT mp_obj_is_small_int
12781280
#define MP_OBJ_IS_QSTR mp_obj_is_qstr
@@ -1285,4 +1287,6 @@ mp_obj_t mp_seq_extract_slice(const mp_obj_t *seq, mp_bound_slice_t *indexes);
12851287
#define MP_MAP_SLOT_IS_FILLED mp_map_slot_is_filled
12861288
#define MP_SET_SLOT_IS_FILLED mp_set_slot_is_filled
12871289

1290+
#endif
1291+
12881292
#endif // MICROPY_INCLUDED_PY_OBJ_H

0 commit comments

Comments
 (0)