summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2021-07-30 22:58:45 +0300
committerPovilas Kanapickas <povilas@radix.lt>2021-07-30 22:58:45 +0300
commit068af21cb376eb824fa1dee29a6539feadb93587 (patch)
tree785dfd66572bb473b3daa15e73c2b1f0552df032
parent4d678b162bf8a3b10e5bdf76df2be63d33c23381 (diff)
c_client.py: Use get_expr_field_names directly to resolve list fields
Using get_expr_fields() is only needed in case we are doing things that can span multiple types easily, e.g. when deciding what data to pass via function parameters and so on. In _c_serialize_helper_list_field() we are building function body, so acquiring field names via get_expr_field_names() is enough. Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
-rw-r--r--src/c_client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c_client.py b/src/c_client.py
index b987f4e..26e2ff7 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -977,7 +977,7 @@ def _c_serialize_helper_list_field(context, self, field,
param_fields, wire_fields, params = get_serialize_params('sizeof', self)
param_names = [p[2] for p in params]
- expr_fields_names = [f.field_name for f in get_expr_fields(field.type)]
+ expr_fields_names = get_expr_field_names(field.type.expr)
resolved = [x for x in expr_fields_names if x in param_names]
unresolved = [x for x in expr_fields_names if x not in param_names]