Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
copy_float->mantissa = floating_point->mantissa;
copy_float->exp = floating_point->exp;
copy_float->user_byte_order = floating_point->user_byte_order;
+ copy_float->declaration.sign = ©_float->sign;
+ copy_float->declaration.mantissa = ©_float->mantissa;
+ copy_float->declaration.exp = ©_float->exp;
end:
return copy;
}
struct bt_ctf_field_type_floating_point {
struct bt_ctf_field_type parent;
struct declaration_float declaration;
+
+ /*
+ * The `declaration` field above contains 3 pointers pointing
+ * to the fields below. This avoids unnecessary dynamic
+ * allocations.
+ */
struct declaration_integer sign;
struct declaration_integer mantissa;
struct declaration_integer exp;