#include <string.h>
#include <assert.h>
#include <string.h>
-#include <babeltrace/compiler.h>
+#include <babeltrace/compiler-internal.h>
#include <babeltrace/object-internal.h>
#include <babeltrace/ref.h>
#include <babeltrace/values.h>
-#include <babeltrace/compat/glib.h>
+#include <babeltrace/compat/glib-internal.h>
#define BT_VALUE_FROM_CONCRETE(_concrete) ((struct bt_value *) (_concrete))
#define BT_VALUE_TO_BOOL(_base) ((struct bt_value_bool *) (_base))
static
struct bt_value bt_value_null_instance = {
+ .base = {
+ .ref_count = {
+ .count = 1,
+ .release = NULL,
+ },
+ .release = NULL,
+ .parent = NULL,
+ },
.type = BT_VALUE_TYPE_NULL,
.is_frozen = true,
};
return ret;
}
-int bt_value_array_size(const struct bt_value *array_obj)
+int64_t bt_value_array_size(const struct bt_value *array_obj)
{
- int ret;
+ int64_t ret;
struct bt_value_array *typed_array_obj =
BT_VALUE_TO_ARRAY(array_obj);
goto end;
}
- ret = (int) typed_array_obj->garray->len;
+ ret = (int64_t) typed_array_obj->garray->len;
end:
return ret;
return ret;
}
-int bt_value_map_size(const struct bt_value *map_obj)
+int64_t bt_value_map_size(const struct bt_value *map_obj)
{
- int ret;
+ int64_t ret;
struct bt_value_map *typed_map_obj = BT_VALUE_TO_MAP(map_obj);
if (!map_obj || !bt_value_is_map(map_obj)) {
goto end;
}
- ret = (int) g_hash_table_size(typed_map_obj->ght);
+ ret = (int64_t) g_hash_table_size(typed_map_obj->ght);
end:
return ret;