X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fpython-complements.c;h=e1c52c9870c08523525141ca18a3339849ab6b42;hp=b6f1d5a88891a98e0081409b3f6d1bfaec956fbf;hb=5792eb34cf619c28d52da0c55f1053ddcda7cf5e;hpb=b94a25e94aba84459aa050ab4c67b8283da1f4be diff --git a/bindings/python/python-complements.c b/bindings/python/python-complements.c index b6f1d5a8..e1c52c98 100644 --- a/bindings/python/python-complements.c +++ b/bindings/python/python-complements.c @@ -135,6 +135,37 @@ end: return array; } +struct bt_declaration *_bt_python_get_array_element_declaration( + struct bt_declaration *field) +{ + struct declaration_array *array_decl; + struct bt_declaration *ret = NULL; + + if (!field) { + goto end; + } + + array_decl = container_of(field, struct declaration_array, p); + ret = array_decl->elem; +end: + return ret; +} + +const char *_bt_python_get_array_string(struct bt_definition *field) +{ + struct definition_array *array; + const char *ret = NULL; + + if (!field) { + goto end; + } + + array = container_of(field, struct definition_array, p); + ret = array->string->str; +end: + return ret; +} + struct definition_sequence *_bt_python_get_sequence_from_def( struct bt_definition *field) {