all: Reformat C and Python source code with tools/codeformat.py.

This is run with uncrustify 0.70.1, and black 19.10b0.
This commit is contained in:
Damien George
2020-02-27 15:36:53 +11:00
parent 3f39d18c2b
commit 69661f3343
539 changed files with 10496 additions and 8254 deletions

View File

@@ -51,7 +51,7 @@ void mp_obj_attrtuple_print_helper(const mp_print_t *print, const qstr *fields,
STATIC void mp_obj_attrtuple_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) {
(void)kind;
mp_obj_tuple_t *o = MP_OBJ_TO_PTR(o_in);
const qstr *fields = (const qstr*)MP_OBJ_TO_PTR(o->items[o->len]);
const qstr *fields = (const qstr *)MP_OBJ_TO_PTR(o->items[o->len]);
mp_obj_attrtuple_print_helper(print, fields, o);
}
@@ -60,7 +60,7 @@ STATIC void mp_obj_attrtuple_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
// load attribute
mp_obj_tuple_t *self = MP_OBJ_TO_PTR(self_in);
size_t len = self->len;
const qstr *fields = (const qstr*)MP_OBJ_TO_PTR(self->items[len]);
const qstr *fields = (const qstr *)MP_OBJ_TO_PTR(self->items[len]);
for (size_t i = 0; i < len; i++) {
if (fields[i] == attr) {
dest[0] = self->items[i];