X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fpython-complements.c;h=3ef0a23af284171bef5bb12bab540cd18c0aad1b;hp=53b616b4ca42740010118f63101281f0e4b7517e;hb=786207e04607df2b90699515bfe7e20b446aa597;hpb=3c2ce778cc0d5e5be91e2fd1d176365a2ad65aa3 diff --git a/bindings/python/python-complements.c b/bindings/python/python-complements.c index 53b616b4..3ef0a23a 100644 --- a/bindings/python/python-complements.c +++ b/bindings/python/python-complements.c @@ -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; +}