Skip to content

Commit 17aeb43

Browse files
committed
py: Un-nest configuration #if/#endif's for selection of complex code.
Because un-nested #if's are simpler to handle with formatting tools.
1 parent 7768a8c commit 17aeb43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

py/objint_mpz.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_i
184184
#if MICROPY_PY_BUILTINS_FLOAT
185185
} else if (mp_obj_is_float(rhs_in)) {
186186
return mp_obj_float_binary_op(op, mpz_as_float(zlhs), rhs_in);
187+
#endif
187188
#if MICROPY_PY_BUILTINS_COMPLEX
188189
} else if (mp_obj_is_type(rhs_in, &mp_type_complex)) {
189190
return mp_obj_complex_binary_op(op, mpz_as_float(zlhs), 0, rhs_in);
190-
#endif
191191
#endif
192192
} else {
193193
// delegate to generic function to check for extra cases

py/runtime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ mp_obj_t mp_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
527527
} else {
528528
return res;
529529
}
530+
#endif
530531
#if MICROPY_PY_BUILTINS_COMPLEX
531532
} else if (mp_obj_is_type(rhs, &mp_type_complex)) {
532533
mp_obj_t res = mp_obj_complex_binary_op(op, lhs_val, 0, rhs);
@@ -535,7 +536,6 @@ mp_obj_t mp_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
535536
} else {
536537
return res;
537538
}
538-
#endif
539539
#endif
540540
}
541541
}

0 commit comments

Comments
 (0)