Expose text arrays the same way as regular arrays
[babeltrace.git] / formats / ctf / types / float.c
index 2daadf91e40de1325832d39e867ab6ff38e826f0..9c60b737815ab587444a8a46b9ae12a63d003e3d 100644 (file)
@@ -232,7 +232,7 @@ int ctf_float_write(struct bt_stream_pos *ppos, struct bt_definition *definition
        union doubleIEEE754 u;
        struct bt_definition *tmpdef;
        struct definition_float *tmpfloat;
-       struct ctf_stream_pos srcp;
+       struct ctf_stream_pos srcp = { { 0 } };
        struct mmap_align mma;
        int ret;
 
@@ -278,6 +278,14 @@ end:
        return ret;
 }
 
+double bt_get_float(const struct bt_definition *field)
+{
+       struct definition_float *definition =
+               container_of(field, struct definition_float, p);
+
+       return definition->value;
+}
+
 static
 void __attribute__((constructor)) ctf_float_init(void)
 {
This page took 0.029946 seconds and 4 git commands to generate.