Fix API : functions to access fields properties
[babeltrace.git] / types / array.c
index dbdcb4be8efd2161e8df6bcc42a3db2711db489c..047adac21902c7d7f438fc14a1e55099181280f1 100644 (file)
@@ -207,6 +207,17 @@ struct definition *array_index(struct definition_array *array, uint64_t i)
        return g_ptr_array_index(array->elems, i);
 }
 
+int get_array_len(const struct definition *field)
+{
+       struct definition_array *array_definition;
+       struct declaration_array *array_declaration;
+
+       array_definition = container_of(field, struct definition_array, p);
+       array_declaration = array_definition->declaration;
+
+       return array_declaration->len;
+}
+
 GString *get_char_array(const struct definition *field)
 {
        struct definition_array *array_definition;
This page took 0.030586 seconds and 4 git commands to generate.