Updated Build Troubleshooting (markdown)

master
Jim Mussared 2022-10-01 10:10:33 +10:00
rodzic 88dd01eb22
commit f0fd2e8463
1 zmienionych plików z 3 dodań i 3 usunięć

@ -15,7 +15,7 @@ const mp_obj_type_t mp_type_foo = {
.print = array_print,
.make_new = array_make_new,
...
locals_dict, &mp_obj_array_locals_dict,
locals_dict, (mp_obj_dict_t *) &mp_obj_array_locals_dict,
};
```
@ -33,7 +33,7 @@ MP_DEFINE_CONST_OBJ_TYPE(
);
```
Note that a trailing comma after the last argument is not allowed.
Note that a trailing comma after the last argument is not allowed, and the cast is no longer required on the locals dict.
The first three arguments (symbol name, type name QSTR, flags) are required, and then a variable number of "slots" can be specified. If you don't have any flags (most types), then use `MP_TYPE_FLAG_NONE`.
@ -46,7 +46,7 @@ STATIC const mp_obj_type_t mp_type_foo = {
then you can add `STATIC` in front of the `MP_DEFINE_CONST_OBJ_TYPE`.
```c
MP_DEFINE_CONST_OBJ_TYPE(
STATIC MP_DEFINE_CONST_OBJ_TYPE(
mp_type_foo,
...
```