Fix: add missing bt_ctf_get_int_len API
[babeltrace.git] / formats / ctf / events.c
index 27a5fe7bff89bc40e7efdbad21b3f18d23cafb4b..4fa8f3036b7b0364bd6eef2e16205c95de682b0b 100644 (file)
@@ -357,6 +357,20 @@ int bt_ctf_get_int_byte_order(const struct definition *field)
        return ret;
 }
 
        return ret;
 }
 
+ssize_t bt_ctf_get_int_len(const struct definition *field)
+{
+       ssize_t ret;
+
+       if (field && bt_ctf_field_type(field) == CTF_TYPE_INTEGER) {
+               ret = (ssize_t) get_int_len(field);
+       } else {
+               ret = -1;
+               bt_ctf_field_set_error(-EINVAL);
+       }
+
+       return ret;
+}
+
 enum ctf_string_encoding bt_ctf_get_encoding(const struct definition *field)
 {
        enum ctf_string_encoding ret = 0;
 enum ctf_string_encoding bt_ctf_get_encoding(const struct definition *field)
 {
        enum ctf_string_encoding ret = 0;
This page took 0.024178 seconds and 4 git commands to generate.