Updated Build Troubleshooting (markdown)

master
Jim Mussared 2022-09-20 19:59:20 +10:00
rodzic aa87c041a7
commit 05a895784c
1 zmienionych plików z 5 dodań i 5 usunięć

@ -89,12 +89,12 @@ MP_DEFINE_CONST_OBJ_TYPE(
If you see errors about `getiter` and/or `iternext` then also see #8813.
In order to save space, the `getiter` and `iternext` slots were merged on `mp_obj_type_t`. The following changes need to be made to your object type definitions.
In order to save space, the `getiter` and `iternext` slots were merged on `mp_obj_type_t` into a single new slot `iter`. The following changes need to be made to your object type definitions.
- If you previously had just a `getiter`, then no change is required.
- If you had `getiter` as `mp_identity_getiter` and a custom `iternext`, then pass your iternext function to the `getiter` slot, and set the `MP_TYPE_FLAG_ITERNEXT` flag.
- If you had `getiter` as `mp_identity_getiter` and `mp_stream_unbuffered_iter` as `iternext`, then just set the `MP_TYPE_FLAG_ITERNEXT_STREAM` and do not set the `getiter` slot.
- If you had both a custom getiter and iternext, then you need to pass an instance of a `mp_getiter_iternext_custom_t` to the `getiter` slot and set the `MP_TYPE_FLAG_ITERNEXT_CUSTOM` flag. See [moduasyncio.c](https://github.com/micropython/micropython/blob/master/extmod/moduasyncio.c).
- If you previously had just a `getiter`, then change `getiter` to `iter` and set the `MP_TYPE_FLAG_ITER_IS_ITERNEXT`.
- If you had `getiter` as `mp_identity_getiter` and a custom `iternext`, then pass your iternext function to the `iter` slot, and set the `MP_TYPE_FLAG_ITER_IS_ITERNEXT` flag.
- If you had `getiter` as `mp_identity_getiter` and `mp_stream_unbuffered_iter` as `iternext`, then just set the `MP_TYPE_FLAG_ITER_IS_STREAM` and do not set the `iter` slot.
- If you had both a custom getiter and iternext, then you need to pass an instance of a `mp_getiter_iternext_custom_t` to the `iter` slot and set the `MP_TYPE_FLAG_ITER_IS_CUSTOM` flag. See [moduasyncio.c](https://github.com/micropython/micropython/blob/master/extmod/moduasyncio.c).
# Dependencies