summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/objfun.c4
-rwxr-xr-xtools/codeformat.py7
2 files changed, 2 insertions, 9 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 3a63d8f43..f9a6b4ebc 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -197,8 +197,8 @@ STATIC void dump_args(const mp_obj_t *a, size_t sz) {
MP_BC_PRELUDE_SIG_DECODE_INTO(ip, n_state_out_var, n_exc_stack, scope_flags, n_pos_args, n_kwonly_args, n_def_args); \
\
/* state size in bytes */ \
- state_size_out_var = n_state_out_var *sizeof(mp_obj_t) \
- + n_exc_stack *sizeof(mp_exc_stack_t); \
+ state_size_out_var = n_state_out_var * sizeof(mp_obj_t) \
+ + n_exc_stack * sizeof(mp_exc_stack_t); \
}
#define INIT_CODESTATE(code_state, _fun_bc, _n_state, n_args, n_kw, args) \
diff --git a/tools/codeformat.py b/tools/codeformat.py
index 5aef4ccfb..364037d2f 100755
--- a/tools/codeformat.py
+++ b/tools/codeformat.py
@@ -76,9 +76,6 @@ C_EXTS = (
PY_EXTS = (".py",)
-FIXUP_REPLACEMENTS = ((re.compile("sizeof\(([a-z_]+)\) \*\(([a-z_]+)\)"), r"sizeof(\1) * (\2)"),)
-
-
def list_files(paths, exclusions=None, prefix=""):
files = set()
for pattern in paths:
@@ -124,10 +121,6 @@ def fixup_c(filename):
if directive == "endif":
dedent_stack.pop()
- # Apply general regex-based fixups.
- for regex, replacement in FIXUP_REPLACEMENTS:
- l = regex.sub(replacement, l)
-
# Write out line.
f.write(l)