py/obj: Add warning note about get_array return value and GC blocks.
diff --git a/py/obj.c b/py/obj.c
index 91dd4c0..9efa0f0 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -317,6 +317,7 @@
#endif
#endif
+// note: returned value in *items may point to the interior of a GC block
void mp_obj_get_array(mp_obj_t o, mp_uint_t *len, mp_obj_t **items) {
if (MP_OBJ_IS_TYPE(o, &mp_type_tuple)) {
mp_obj_tuple_get(o, len, items);
@@ -333,6 +334,7 @@
}
}
+// note: returned value in *items may point to the interior of a GC block
void mp_obj_get_array_fixed_n(mp_obj_t o, mp_uint_t len, mp_obj_t **items) {
mp_uint_t seq_len;
mp_obj_get_array(o, &seq_len, items);