Fix: Ensure a packet context is a structure

bt_ctf_stream_class_set_packet_context_type was checking the current
stream packet context's type instead of the one being passed.

Added a test to validate that the check is done appropriately.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Missing description NULL check in bt_ctf_clock when serializing

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Incorrect variant tag validation

An erroneous tag validation causes bt_ctf_field_variant_get_field() to
fail when called a second time on a given variant field.

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

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

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Only allow setting a packet context on a non-frozen stream class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Cleanup: Missing whitespace in comment

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: Add unit tests for stream event context accessors
Cleanup: Remove unnecessary argument name

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

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: Add unit tests for stream event context accessors

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Cleanup: Misplaced end label in bt_ctf_stream_get_packet_context

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Docs: Add a comment about event validation in bt_ctf_stream_append_event

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Check integer signedness in packet header when auto-populating

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Docs: Remove extra underscore from function header

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

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Docs: Indicate that stream event context is sampled on event append

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: Add event context accessors unit tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python: decouple Python iface from native binding

With this patch, all the SWIG stuff is isolated into
nativebt.i, whereas the real Babeltrace Python interface
is plain Python in bt.py.

The Babeltrace Python binding is now a Python package, but
backward compatibility with the original module is ensured
by importing all public symbols from the bt module in the
package itself (__init__.py), which is named like the
original module, babeltrace.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Python: remove explicit inheritance from object

This is a Python 3 binding, and all classes are new-style
classes in Python 3, so there is no need to inherit from object
explicitly.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>