Fix: Throw a FieldError exception when get_value() fails

Throw an exception whenever bt_ctf_field_get_error() reports an error.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add support for floating point fields in the python bindings

get_value() now returns a floating point field's value.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add support for variant fields in the python bindings

get_value() now returns the variant's selected field's value
when called on a variant.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add support for structure fields in the Python bindings

get_value() returns a dictionary when the field is a structure.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Python bindings array access functions write out of bounds

The array access functions in the Python complements are writing
past the last element to add a NULL pointer and then using it from the
Python code to detect the end of the array. This may cause stability
issues.

This changes the functions to return multiple values (array and length)
in Python using SWIG's built-in OUTPUT typemaps.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Rename the ctf class to CTFReader

This prevents name collisions with the upcoming CTFWriter classes.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add CTF Writer Python bindings

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add a usage example for the CTF Writer Python bindings

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Don't generate Python bindings by default

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>