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