#include <babeltrace/ctf-writer/resolve-internal.h>
#include <babeltrace/ctf-writer/stream-class.h>
#include <babeltrace/ctf-writer/utils-internal.h>
-#include <babeltrace/object.h>
+#include <babeltrace/ctf-writer/object.h>
#include <babeltrace/types.h>
-#include <babeltrace/values.h>
+#include <babeltrace/ctf-writer/values-internal.h>
#include <glib.h>
#include <inttypes.h>
#include <limits.h>
* * Event payload
*/
struct resolve_context {
- struct bt_value *environment;
+ struct bt_ctf_private_value *environment;
struct bt_ctf_field_type_common *scopes[6];
/* Root scope being visited */
{
struct type_stack_frame *frame = data;
- BT_OBJECT_PUT_REF_AND_RESET(frame->type);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(frame->type);
g_free(frame);
}
BT_LOGV("Pushing field type on context's stack: "
"ft-addr=%p, stack-size-before=%u", type, stack->len);
- frame->type = bt_object_get_ref(type);
+ frame->type = bt_ctf_object_get_ref(type);
g_ptr_array_add(stack, frame);
end:
bt_bool first_level_done = BT_FALSE;
/* Get our own reference */
- bt_object_get_ref(type);
+ bt_ctf_object_get_ref(type);
/* Locate target */
while (cur_ptoken) {
}
/* Move child type to current type */
- bt_object_get_ref(child_type);
- BT_OBJECT_MOVE_REF(type, child_type);
+ bt_ctf_object_get_ref(child_type);
+ BT_CTF_OBJECT_MOVE_REF(type, child_type);
}
end:
- bt_object_put_ref(type);
+ bt_ctf_object_put_ref(type);
return ret;
}
}
end:
- BT_OBJECT_PUT_REF_AND_RESET(tail_field_path);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(tail_field_path);
return ret;
}
end:
if (ret) {
- BT_OBJECT_PUT_REF_AND_RESET(field_path);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(field_path);
}
ptokens_destroy(ptokens);
/* Start with root type */
type = get_type_from_ctx(ctx, field_path->root);
- bt_object_get_ref(type);
+ bt_ctf_object_get_ref(type);
if (!type) {
/* Error: root type is not available */
BT_LOGW("Root field type is not available: root-scope=%s",
}
/* Move child type to current type */
- bt_object_get_ref(child_type);
- BT_OBJECT_MOVE_REF(type, child_type);
+ bt_ctf_object_get_ref(child_type);
+ BT_CTF_OBJECT_MOVE_REF(type, child_type);
}
return type;
error:
- BT_OBJECT_PUT_REF_AND_RESET(type);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(type);
return type;
}
return field_path;
error:
- BT_OBJECT_PUT_REF_AND_RESET(field_path);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(field_path);
return field_path;
}
}
end:
- BT_OBJECT_PUT_REF_AND_RESET(ctx_field_path);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(ctx_field_path);
return ret;
}
g_string_free(target_field_path_pretty, TRUE);
}
- BT_OBJECT_PUT_REF_AND_RESET(target_field_path);
- BT_OBJECT_PUT_REF_AND_RESET(target_type);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(target_field_path);
+ BT_CTF_OBJECT_PUT_REF_AND_RESET(target_type);
return ret;
}
BT_HIDDEN
int bt_ctf_resolve_types(
- struct bt_value *environment,
+ struct bt_ctf_private_value *environment,
struct bt_ctf_field_type_common *packet_header_type,
struct bt_ctf_field_type_common *packet_context_type,
struct bt_ctf_field_type_common *event_header_type,