File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1111# We can allow bitcasts in cases where the width of the types is the same in
1212# the future. But for now, we do not allow any re-interpretation of variables.
1313
14+
1415@bpf
1516@map
1617def last () -> HashMap :
Original file line number Diff line number Diff line change 99# the compiler, it is recommended to use named variables to reduce the amount of
1010# scratch space that needs to be allocated.
1111
12+
1213@bpf
1314@struct
1415class data_t :
@@ -48,8 +49,12 @@ def hello_world(ctx: c_void_p) -> c_int64:
4849 a = last .lookup (0 )
4950 print (f"a is { a } " )
5051 last .update (9 , 9 )
51- last .update (0 , last .lookup (last .lookup (0 )) +
52- last .lookup (last .lookup (0 )) + last .lookup (last .lookup (0 )))
52+ last .update (
53+ 0 ,
54+ last .lookup (last .lookup (0 ))
55+ + last .lookup (last .lookup (0 ))
56+ + last .lookup (last .lookup (0 )),
57+ )
5358 z = last .lookup (0 )
5459 print (f"new map val at index 0 is { z } " )
5560 else :
You can’t perform that action at this time.
0 commit comments