X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fpython-complements.c;h=6f947bd04e331cb3675a3820b8166e6e2af18e5f;hp=e1c52c9870c08523525141ca18a3339849ab6b42;hb=e11b8d3a38c016ebbbc849e2b1aabf0a80a28ce4;hpb=7569fbb1a48465f4399c7e3f8db72c9836c6ca8a diff --git a/bindings/python/python-complements.c b/bindings/python/python-complements.c index e1c52c98..6f947bd0 100644 --- a/bindings/python/python-complements.c +++ b/bindings/python/python-complements.c @@ -151,6 +151,22 @@ end: return ret; } +struct bt_declaration *_bt_python_get_sequence_element_declaration( + struct bt_declaration *field) +{ + struct declaration_sequence *sequence_decl; + struct bt_declaration *ret = NULL; + + if (!field) { + goto end; + } + + sequence_decl = container_of(field, struct declaration_sequence, p); + ret = sequence_decl->elem; +end: + return ret; +} + const char *_bt_python_get_array_string(struct bt_definition *field) { struct definition_array *array; @@ -166,6 +182,21 @@ end: return ret; } +const char *_bt_python_get_sequence_string(struct bt_definition *field) +{ + struct definition_sequence *sequence; + const char *ret = NULL; + + if (!field) { + goto end; + } + + sequence = container_of(field, struct definition_sequence, p); + ret = sequence->string->str; +end: + return ret; +} + struct definition_sequence *_bt_python_get_sequence_from_def( struct bt_definition *field) {