Support for the sequence type
[babeltrace.git] / bindings / python / python-complements.c
index 53b616b4ca42740010118f63101281f0e4b7517e..3ef0a23af284171bef5bb12bab540cd18c0aad1b 100644 (file)
@@ -137,3 +137,14 @@ struct definition_array *_bt_python_get_array_from_def(
 end:
        return array;
 }
+
+struct definition_sequence *_bt_python_get_sequence_from_def(
+               struct bt_definition *field)
+{
+       if (field && bt_ctf_field_type(
+               bt_ctf_get_decl_from_def(field)) == CTF_TYPE_SEQUENCE) {
+               return container_of(field, struct definition_sequence, p);
+       }
+
+       return NULL;
+}
This page took 0.023576 seconds and 4 git commands to generate.