lib: split real FC/field into single and double prec FC/field
[babeltrace.git] / src / plugins / lttng-utils / debug-info / trace-ir-data-copy.c
index e499ea3c7c907e8be42289fa05d1c1e536084f7c..a2b92f7c67f8392958d1fb967094222c9d298d0b 100644 (file)
@@ -57,6 +57,13 @@ void copy_trace_content(const bt_trace *in_trace, bt_trace *out_trace,
                }
        }
 
+       /*
+        * Safe to use the same value object because it's frozen at this
+        * point.
+        */
+       bt_trace_set_user_attributes(out_trace,
+               bt_trace_borrow_user_attributes_const(in_trace));
+
        /*
         * Do not copy the trace UUID as it may be modified and should
         * no longer have the same UUID.
@@ -133,6 +140,12 @@ void copy_stream_content(const bt_stream *in_stream, bt_stream *out_stream,
                }
        }
 
+       /*
+        * Safe to use the same value object because it's frozen at this
+        * point.
+        */
+       bt_stream_set_user_attributes(out_stream,
+               bt_stream_borrow_user_attributes_const(in_stream));
        BT_COMP_LOGD("Copied content of stream: in-s-addr=%p, out-s-addr=%p",
                        in_stream, out_stream);
 end:
@@ -237,9 +250,13 @@ void copy_field_content(const bt_field *in_field, bt_field *out_field,
                bt_field_integer_signed_set_value(out_field,
                                bt_field_integer_signed_get_value(in_field));
                break;
-       case BT_FIELD_CLASS_TYPE_REAL:
-               bt_field_real_set_value(out_field,
-                               bt_field_real_get_value(in_field));
+       case BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL:
+               bt_field_real_single_precision_set_value(out_field,
+                               bt_field_real_single_precision_get_value(in_field));
+               break;
+       case BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL:
+               bt_field_real_double_precision_set_value(out_field,
+                               bt_field_real_double_precision_get_value(in_field));
                break;
        case BT_FIELD_CLASS_TYPE_STRING:
        {
This page took 0.029784 seconds and 4 git commands to generate.