<div dir="ltr">Signed-off-by: Xiaona Han <<a href="mailto:xiaonahappy13@gmail.com">xiaonahappy13@gmail.com</a>><br>---<br> bindings/python/<a href="http://babeltrace.i.in">babeltrace.i.in</a>      |   73 +++++++++++++++++-----------------<br>
 bindings/python/python-complements.c |   12 +++---<br> bindings/python/python-complements.h |    8 ++--<br> 3 files changed, 46 insertions(+), 47 deletions(-)<br><br>diff --git a/bindings/python/<a href="http://babeltrace.i.in">babeltrace.i.in</a> b/bindings/python/<a href="http://babeltrace.i.in">babeltrace.i.in</a><br>
index a5426c8..bb0a9b3 100644<br>--- a/bindings/python/<a href="http://babeltrace.i.in">babeltrace.i.in</a><br>+++ b/bindings/python/<a href="http://babeltrace.i.in">babeltrace.i.in</a><br>@@ -45,7 +45,6 @@ trace to it."<br>
 #include <babeltrace/iterator-internal.h><br> #include <babeltrace/format.h><br> #include <babeltrace/list.h><br>-#include <babeltrace/uuid.h><br> #include <babeltrace/types.h><br> #include <babeltrace/ctf/iterator.h><br>
 #include "python-complements.h"<br>@@ -74,8 +73,8 @@ typedef int bt_intern_str;<br> <br> struct bt_context *bt_context_create(void);<br> int bt_context_add_trace(struct bt_context *ctx, const char *path, const char *format,<br>
-        void (*packet_seek)(struct stream_pos *pos, size_t index, int whence),<br>-        struct mmap_stream_list *stream_list, FILE *metadata);<br>+        void (*packet_seek)(struct bt_stream_pos *pos, size_t index, int whence),<br>
+        struct bt_mmap_stream_list *stream_list, FILE *metadata);<br> void bt_context_remove_trace(struct bt_context *ctx, int trace_id);<br> void bt_context_get(struct bt_context *ctx);<br> void bt_context_put(struct bt_context *ctx);<br>
@@ -192,7 +191,7 @@ class Context:<br> <br> extern struct format *bt_lookup_format(bt_intern_str qname);<br> extern void bt_fprintf_format_list(FILE *fp);<br>-extern int bt_register_format(struct format *format);<br>+extern int bt_register_format(struct bt_format *format);<br>
 <br> %pythoncode %{<br> <br>@@ -550,58 +549,58 @@ struct bt_ctf_event *bt_ctf_iter_read_event(struct bt_ctf_iter *iter);<br>         const struct bt_ctf_event *ctf_event);<br> <br> %rename("_bt_ctf_get_field") bt_ctf_get_field(const struct bt_ctf_event *ctf_event,<br>
-        const struct definition *scope,    const char *field);<br>+        const struct bt_definition *scope,    const char *field);<br> %rename("_bt_ctf_get_index") bt_ctf_get_index(const struct bt_ctf_event *ctf_event,<br>
-        const struct definition *field,    unsigned int index);<br>-%rename("_bt_ctf_field_name") bt_ctf_field_name(const struct definition *field);<br>-%rename("_bt_ctf_field_type") bt_ctf_field_type(const struct declaration *field);<br>
+        const struct bt_definition *field,    unsigned int index);<br>+%rename("_bt_ctf_field_name") bt_ctf_field_name(const struct bt_definition *field);<br>+%rename("_bt_ctf_field_type") bt_ctf_field_type(const struct bt_declaration *field);<br>
 %rename("_bt_ctf_get_int_signedness") bt_ctf_get_int_signedness(<br>-        const struct declaration *field);<br>-%rename("_bt_ctf_get_int_base") bt_ctf_get_int_base(const struct declaration *field);<br>
+        const struct bt_declaration *field);<br>+%rename("_bt_ctf_get_int_base") bt_ctf_get_int_base(const struct bt_declaration *field);<br> %rename("_bt_ctf_get_int_byte_order") bt_ctf_get_int_byte_order(<br>
-        const struct declaration *field);<br>-%rename("_bt_ctf_get_int_len") bt_ctf_get_int_len(const struct declaration *field);<br>-%rename("_bt_ctf_get_encoding") bt_ctf_get_encoding(const struct declaration *field);<br>
-%rename("_bt_ctf_get_array_len") bt_ctf_get_array_len(const struct declaration *field);<br>-%rename("_bt_ctf_get_uint64") bt_ctf_get_uint64(const struct definition *field);<br>-%rename("_bt_ctf_get_int64") bt_ctf_get_int64(const struct definition *field);<br>
-%rename("_bt_ctf_get_char_array") bt_ctf_get_char_array(const struct definition *field);<br>-%rename("_bt_ctf_get_string") bt_ctf_get_string(const struct definition *field);<br>+        const struct bt_declaration *field);<br>
+%rename("_bt_ctf_get_int_len") bt_ctf_get_int_len(const struct bt_declaration *field);<br>+%rename("_bt_ctf_get_encoding") bt_ctf_get_encoding(const struct bt_declaration *field);<br>+%rename("_bt_ctf_get_array_len") bt_ctf_get_array_len(const struct bt_declaration *field);<br>
+%rename("_bt_ctf_get_uint64") bt_ctf_get_uint64(const struct bt_definition *field);<br>+%rename("_bt_ctf_get_int64") bt_ctf_get_int64(const struct bt_definition *field);<br>+%rename("_bt_ctf_get_char_array") bt_ctf_get_char_array(const struct bt_definition *field);<br>
+%rename("_bt_ctf_get_string") bt_ctf_get_string(const struct bt_definition *field);<br> %rename("_bt_ctf_field_get_error") bt_ctf_field_get_error(void);<br> %rename("_bt_ctf_get_decl_event_name") bt_ctf_get_decl_event_name(const struct<br>
         bt_ctf_event_decl *event);<br> %rename("_bt_ctf_get_decl_field_name") bt_ctf_get_decl_field_name(<br>         const struct bt_ctf_field_decl *field);<br> %rename("_bt_ctf_get_decl_from_def") bt_ctf_get_decl_from_def(<br>
-        const struct definition *field);<br>+        const struct bt_definition *field);<br> <br>-const struct definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event,<br>+const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event,<br>
         enum bt_ctf_scope scope);<br> const char *bt_ctf_event_name(const struct bt_ctf_event *ctf_event);<br> uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event);<br> uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event);<br>
-const struct definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,<br>-        const struct definition *scope,<br>+const struct bt_definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event,<br>+        const struct bt_definition *scope,<br>
         const char *field);<br>-const struct definition *bt_ctf_get_index(const struct bt_ctf_event *ctf_event,<br>-        const struct definition *field,<br>+const struct bt_definition *bt_ctf_get_index(const struct bt_ctf_event *ctf_event,<br>
+        const struct bt_definition *field,<br>         unsigned int index);<br>-const char *bt_ctf_field_name(const struct definition *field);<br>-enum ctf_type_id bt_ctf_field_type(const struct declaration *field);<br>-int bt_ctf_get_int_signedness(const struct declaration *field);<br>
-int bt_ctf_get_int_base(const struct declaration *field);<br>-int bt_ctf_get_int_byte_order(const struct declaration *field);<br>-ssize_t bt_ctf_get_int_len(const struct declaration *field);<br>-enum ctf_string_encoding bt_ctf_get_encoding(const struct declaration *field);<br>
-int bt_ctf_get_array_len(const struct declaration *field);<br>-uint64_t bt_ctf_get_uint64(const struct definition *field);<br>-int64_t bt_ctf_get_int64(const struct definition *field);<br>-char *bt_ctf_get_char_array(const struct definition *field);<br>
-char *bt_ctf_get_string(const struct definition *field);<br>+const char *bt_ctf_field_name(const struct bt_definition *field);<br>+enum ctf_type_id bt_ctf_field_type(const struct bt_declaration *field);<br>+int bt_ctf_get_int_signedness(const struct bt_declaration *field);<br>
+int bt_ctf_get_int_base(const struct bt_declaration *field);<br>+int bt_ctf_get_int_byte_order(const struct bt_declaration *field);<br>+ssize_t bt_ctf_get_int_len(const struct bt_declaration *field);<br>+enum ctf_string_encoding bt_ctf_get_encoding(const struct bt_declaration *field);<br>
+int bt_ctf_get_array_len(const struct bt_declaration *field);<br>+uint64_t bt_ctf_get_uint64(const struct bt_definition *field);<br>+int64_t bt_ctf_get_int64(const struct bt_definition *field);<br>+char *bt_ctf_get_char_array(const struct bt_definition *field);<br>
+char *bt_ctf_get_string(const struct bt_definition *field);<br> int bt_ctf_field_get_error(void);<br> const char *bt_ctf_get_decl_event_name(const struct bt_ctf_event_decl *event);<br> const char *bt_ctf_get_decl_field_name(const struct bt_ctf_field_decl *field);<br>
-const struct declaration *bt_ctf_get_decl_from_def(const struct definition *field);<br>+const struct bt_declaration *bt_ctf_get_decl_from_def(const struct bt_definition *field);<br> <br> %pythoncode%{<br> <br>diff --git a/bindings/python/python-complements.c b/bindings/python/python-complements.c<br>
index a4ee37e..aa65555 100644<br>--- a/bindings/python/python-complements.c<br>+++ b/bindings/python/python-complements.c<br>@@ -44,16 +44,16 @@ void _bt_file_close(FILE *fp)<br> */<br> <br> /* ctf-field-list */<br>-struct definition **_bt_python_field_listcaller(<br>
+struct bt_definition **_bt_python_field_listcaller(<br>         const struct bt_ctf_event *ctf_event,<br>-        const struct definition *scope)<br>+        const struct bt_definition *scope)<br> {<br>-    struct definition **list;<br>
+    struct bt_definition **list;<br>     unsigned int count;<br>     int ret;<br> <br>     ret = bt_ctf_get_field_list(ctf_event, scope,<br>-        (const struct definition * const **)&list, &count);<br>+        (const struct bt_definition * const **)&list, &count);<br>
 <br>     if (ret < 0)    /* For python to know an error occured */<br>         list = NULL;<br>@@ -63,8 +63,8 @@ struct definition **_bt_python_field_listcaller(<br>     return list;<br> }<br> <br>-struct definition *_bt_python_field_one_from_list(<br>
-        struct definition **list, int index)<br>+struct bt_definition *_bt_python_field_one_from_list(<br>+        struct bt_definition **list, int index)<br> {<br>     return list[index];<br> }<br>diff --git a/bindings/python/python-complements.h b/bindings/python/python-complements.h<br>
index 9597d70..4335d8a 100644<br>--- a/bindings/python/python-complements.h<br>+++ b/bindings/python/python-complements.h<br>@@ -32,11 +32,11 @@ FILE *_bt_file_open(char *file_path, char *mode);<br> void _bt_file_close(FILE *fp);<br>
 <br> /* ctf-field-list */<br>-struct definition **_bt_python_field_listcaller(<br>+struct bt_definition **_bt_python_field_listcaller(<br>         const struct bt_ctf_event *ctf_event,<br>-        const struct definition *scope);<br>
-struct definition *_bt_python_field_one_from_list(<br>-        struct definition **list, int index);<br>+        const struct bt_definition *scope);<br>+struct bt_definition *_bt_python_field_one_from_list(<br>+        struct bt_definition **list, int index);<br>
 <br> /* event_decl_list */<br> struct bt_ctf_event_decl **_bt_python_event_decl_listcaller(<br>-- <br>1.7.1<br><br></div>