2 * SPDX-License-Identifier: MIT
4 * Copyright 2018 Philippe Proulx <pproulx@efficios.com>
7 #define BT_LOG_TAG "CTF-WRITER/FIELD-WRAPPER"
13 #include "field-wrapper.h"
16 struct bt_ctf_field_wrapper
*bt_ctf_field_wrapper_new(void *data
)
18 struct bt_ctf_field_wrapper
*field_wrapper
=
19 g_new0(struct bt_ctf_field_wrapper
, 1);
21 BT_LOGD_STR("Creating empty field wrapper object.");
24 BT_LOGE("Failed to allocate one field wrapper.");
28 bt_ctf_object_init_unique(&field_wrapper
->base
);
29 BT_LOGD("Created empty field wrapper object: addr=%p",
36 void bt_ctf_field_wrapper_destroy(struct bt_ctf_field_wrapper
*field_wrapper
)
38 BT_LOGD("Destroying field wrapper: addr=%p", field_wrapper
);
39 BT_ASSERT_DBG(!field_wrapper
->field
);
40 BT_LOGD_STR("Putting stream class.");
41 g_free(field_wrapper
);
44 struct bt_ctf_field_wrapper
*bt_ctf_field_wrapper_create(
45 struct bt_ctf_object_pool
*pool
, struct bt_ctf_field_type
*ft
)
47 struct bt_ctf_field_wrapper
*field_wrapper
= NULL
;
51 field_wrapper
= bt_ctf_object_pool_create_object(pool
);
53 BT_LOGE("Cannot allocate one field wrapper");
57 BT_ASSERT_DBG(field_wrapper
->field
);
This page took 0.033826 seconds and 5 git commands to generate.