mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Replace usage of get_key_ptr with get_or_create_ptr_from_arg
This commit is contained in:
@ -38,7 +38,7 @@ def create_int_constant_ptr(value, builder, int_width=64):
|
||||
|
||||
|
||||
def get_or_create_ptr_from_arg(arg, builder, local_sym_tab):
|
||||
"""Extract key pointer from the call arguments."""
|
||||
"""Extract or create pointer from the call arguments."""
|
||||
|
||||
if isinstance(arg, ast.Name):
|
||||
ptr = get_var_ptr_from_name(arg.id, local_sym_tab)
|
||||
@ -46,5 +46,5 @@ def get_or_create_ptr_from_arg(arg, builder, local_sym_tab):
|
||||
ptr = create_int_constant_ptr(arg.value, builder)
|
||||
else:
|
||||
raise NotImplementedError(
|
||||
"Only simple variable names are supported as keys in map lookup.")
|
||||
"Only simple variable names are supported as args in map helpers.")
|
||||
return ptr
|
||||
|
||||
Reference in New Issue
Block a user