Skip to content

Commit

Permalink
py/obj: Remove the legacy object API for version 2.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
projectgus authored and dpgeorge committed Aug 14, 2024
1 parent 1473ed4 commit 6c870dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py/obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,8 @@ mp_obj_t mp_seq_extract_slice(const mp_obj_t *seq, mp_bound_slice_t *indexes);
memmove(((char *)dest) + (beg + slice_len) * (item_sz), ((char *)dest) + (end) * (item_sz), ((dest_len) + (len_adj) - ((beg) + (slice_len))) * (item_sz)); \
memmove(((char *)dest) + (beg) * (item_sz), slice, slice_len * (item_sz));

#if !MICROPY_PREVIEW_VERSION_2

// Provide translation for legacy API
#define MP_OBJ_IS_SMALL_INT mp_obj_is_small_int
#define MP_OBJ_IS_QSTR mp_obj_is_qstr
Expand All @@ -1285,4 +1287,6 @@ mp_obj_t mp_seq_extract_slice(const mp_obj_t *seq, mp_bound_slice_t *indexes);
#define MP_MAP_SLOT_IS_FILLED mp_map_slot_is_filled
#define MP_SET_SLOT_IS_FILLED mp_set_slot_is_filled

#endif

#endif // MICROPY_INCLUDED_PY_OBJ_H

0 comments on commit 6c870dc

Please sign in to comment.