test-field.sh: make sure bt_run_in_py_env() and bt_cli() succeed
[babeltrace.git] / src / lib / value.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (c) 2015-2018 Philippe Proulx <pproulx@efficios.com>
5 */
6
7#ifndef BABELTRACE_VALUES_INTERNAL_H
8#define BABELTRACE_VALUES_INTERNAL_H
9
10#include <glib.h>
11#include <babeltrace2/babeltrace.h>
12
13#include "lib/object.h"
14
15struct bt_value {
16 struct bt_object base;
17 enum bt_value_type type;
18 bt_bool frozen;
19};
20
21struct bt_value_bool {
22 struct bt_value base;
23 bt_bool value;
24};
25
26struct bt_value_integer {
27 struct bt_value base;
28 union {
29 uint64_t i;
30 int64_t u;
31 } value;
32};
33
34struct bt_value_real {
35 struct bt_value base;
36 double value;
37};
38
39struct bt_value_string {
40 struct bt_value base;
41 GString *gstr;
42};
43
44struct bt_value_array {
45 struct bt_value base;
46 GPtrArray *garray;
47};
48
49struct bt_value_map {
50 struct bt_value base;
51 GHashTable *ght;
52};
53
54void _bt_value_freeze(const struct bt_value *object);
55
56#ifdef BT_DEV_MODE
57# define bt_value_freeze _bt_value_freeze
58#else
59# define bt_value_freeze(_value)
60#endif /* BT_DEV_MODE */
61
62#endif /* BABELTRACE_VALUES_INTERNAL_H */
This page took 0.023303 seconds and 5 git commands to generate.