/*
- * Values.c: value objects
- *
- * Babeltrace Library
- *
* Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
* Copyright (c) 2015 Philippe Proulx <pproulx@efficios.com>
*
void bt_value_string_destroy(struct bt_value *object)
{
g_string_free(BT_VALUE_TO_STRING(object)->gstr, TRUE);
+ BT_VALUE_TO_STRING(object)->gstr = NULL;
}
static
* of putting each contained object.
*/
g_ptr_array_free(BT_VALUE_TO_ARRAY(object)->garray, TRUE);
+ BT_VALUE_TO_ARRAY(object)->garray = NULL;
}
static
* be destroyed anyway.
*/
g_hash_table_destroy(BT_VALUE_TO_MAP(object)->ght);
+ BT_VALUE_TO_MAP(object)->ght = NULL;
}
static
enum bt_value_status bt_value_map_extend(
struct bt_private_value **extended_map_obj,
- struct bt_value *base_map_obj,
- struct bt_value *extension_obj)
+ const struct bt_value *base_map_obj,
+ const struct bt_value *extension_obj)
{
struct extend_map_element_data extend_data = {
.extended_obj = NULL,
end:
return ret;
}
-
-struct bt_value *bt_value_borrow_from_private(
- struct bt_private_value *priv_value)
-{
- return (void *) priv_value;
-}