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>
Expose text arrays the same way as regular arrays

Store the content of text arrays both in the "elems" array and in a
string. While it does duplicate the data, this makes it possible to
access arrays containing UTF-8 or ASCII data the same way as regular
arrays.

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