summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-08-13 16:32:51 +1000
committerDamien George <damien@micropython.org>2024-08-14 10:33:52 +1000
commit6c870dc5ecc048309f7fcb21324b1aed165afdb0 (patch)
tree27bf91752ca31075788155fa0fb7c261f6e9dd71
parent1473ed4c6460dd3d5df01e60eaa7db1c80baf8fd (diff)
downloadmicropython-6c870dc5ecc048309f7fcb21324b1aed165afdb0.tar.gz
micropython-6c870dc5ecc048309f7fcb21324b1aed165afdb0.zip
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 <angus@redyak.com.au>
-rw-r--r--py/obj.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index 46d42baf4b..81ee75aebc 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -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
@@ -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