From f4f591f8b59dab384912acd0743ae43d92ba409a Mon Sep 17 00:00:00 2001 From: Gerwin Klein Date: Mon, 17 Jun 2024 18:34:48 +1000 Subject: [PATCH] trivial: python style fix Signed-off-by: Gerwin Klein --- camkes/runner/Context.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/camkes/runner/Context.py b/camkes/runner/Context.py index 659e48f4..8dad785f 100644 --- a/camkes/runner/Context.py +++ b/camkes/runner/Context.py @@ -80,7 +80,7 @@ def new_context(entity, assembly, render_state, state_key, outfile_name, # you see `set y = alloc('foo', bar, moo)` in template code, think: # set x = alloc_obj('foo_obj', bar) # set y = alloc_cap('foo_cap', x, moo) - 'alloc': None if cap_space is None else \ + 'alloc': None if cap_space is None else (lambda name, type, label=entity.label(), **kwargs: alloc_cap((entity.label(), cap_space), cap_space, name, alloc_obj((entity.label(), obj_space), obj_space, '%s_%s' % @@ -94,14 +94,14 @@ def new_context(entity, assembly, render_state, state_key, outfile_name, # same shared variable. The local name (lname) will later be used by us # to locate the relevant ELF frame(s) to remap. Note that we assume # address spaces and CSpaces are 1-to-1. - 'register_shared_variable': None if cap_space is None else \ + 'register_shared_variable': None if cap_space is None else (lambda global_name, symbol, size, frame_size=None, paddr=None, perm='RWX', cached=True, label=entity.parent.label(), with_mapping_caps=None: register_shared_variable( addr_space, obj_space, global_name, symbol, size, cap_space, frame_size, paddr, perm, cached, label, with_mapping_caps)), - 'get_shared_variable_backing_frames': None if cap_space is None else \ + 'get_shared_variable_backing_frames': None if cap_space is None else (lambda global_name, size, frame_size=None, label=entity.parent.label(): get_shared_variable_backing_frames( obj_space, global_name, size, frame_size, label)),