mirror of
https://github.com/micropython/micropython.git
synced 2026-01-23 04:10:19 +01:00
Updated Build Troubleshooting (markdown)
@@ -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,
|
||||
...
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user