if (event_class->name.str) {
g_string_free(event_class->name.str, TRUE);
+ event_class->name.str = NULL;
}
if (event_class->emf_uri.str) {
g_string_free(event_class->emf_uri.str, TRUE);
+ event_class->emf_uri.str = NULL;
}
BT_LOGD_STR("Putting context field classe.");
- bt_object_put_ref(event_class->specific_context_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(event_class->specific_context_fc);
BT_LOGD_STR("Putting payload field classe.");
- bt_object_put_ref(event_class->payload_fc);
+ BT_OBJECT_PUT_REF_AND_RESET(event_class->payload_fc);
bt_object_pool_finalize(&event_class->event_pool);
g_free(obj);
}
return event_class->log_level.base.avail;
}
-int bt_private_event_class_set_log_level(
+void bt_private_event_class_set_log_level(
struct bt_private_event_class *priv_event_class,
enum bt_event_class_log_level log_level)
{
bt_property_uint_set(&event_class->log_level,
(uint64_t) log_level);
BT_LIB_LOGV("Set event class's log level: %!+E", event_class);
- return 0;
}
const char *bt_event_class_get_emf_uri(struct bt_event_class *event_class)
}
struct bt_private_stream_class *
-bt_private_event_class_borrow_private_stream_class(
+bt_private_event_class_borrow_stream_class(
struct bt_private_event_class *event_class)
{
return (void *) bt_event_class_borrow_stream_class(
}
struct bt_private_field_class *
-bt_private_event_class_borrow_specific_context_private_field_class(
+bt_private_event_class_borrow_specific_context_field_class(
struct bt_private_event_class *event_class)
{
return (void *) bt_event_class_borrow_specific_context_field_class(
(void *) event_class);
}
-int bt_private_event_class_set_specific_context_private_field_class(
+int bt_private_event_class_set_specific_context_field_class(
struct bt_private_event_class *priv_event_class,
struct bt_private_field_class *priv_field_class)
{
return event_class->payload_fc;
}
-struct bt_private_field_class *bt_private_event_class_borrow_payload_private_field_class(
+struct bt_private_field_class *bt_private_event_class_borrow_payload_field_class(
struct bt_private_event_class *event_class)
{
return (void *) bt_event_class_borrow_payload_field_class(
(void *) event_class);
}
-int bt_private_event_class_set_payload_private_field_class(
+int bt_private_event_class_set_payload_field_class(
struct bt_private_event_class *priv_event_class,
struct bt_private_field_class *priv_field_class)
{
BT_LIB_LOGD("Freezing event class: %!+E", event_class);
event_class->frozen = true;
}
-
-struct bt_event_class *bt_event_class_borrow_from_private(
- struct bt_private_event_class *priv_event_class)
-{
- return (void *) priv_event_class;
-}