Closed DonAurelio closed 12 months ago
Okay, I just realized that we can't cast to the @cast_type
in get_setter
since the user could cast to a non-babeltrace type, then we won't be able to set the field. We just need to remove the dead line.
Yes, push message are more complicated.
In theory, we should have the cast_type as input, and the cast to bt_type
when calling the function.
For struct -> string , we should do the memcopy trick
cast_func = @cast_type ? "(#{self.class.instance_variable_get(:@bt_type)})" : ''
is a dead line.https://github.com/TApplencourt/metababel/blob/5999e715532185974ae334607c82f85a02c20a14/lib/metababel/bt2_trace_class_generator.rb#L444-L450
Possible solution
@cast_type
, not@bt_type
.