Allocate structure fields on creation
[babeltrace.git] / include / babeltrace / ctf-ir / fields-internal.h
index 720b88848b776f10d1de6d1563d542e488b28c73..f7d39d10b23b61e78e4de7f8f0683c8b65f80f16 100644 (file)
@@ -31,7 +31,9 @@
 #include <babeltrace/ctf-writer/event-fields.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/types.h>
 #include <stdint.h>
+#include <stdbool.h>
 #include <glib.h>
 
 struct bt_ctf_stream_pos;
@@ -39,8 +41,8 @@ struct bt_ctf_stream_pos;
 struct bt_ctf_field {
        struct bt_object base;
        struct bt_ctf_field_type *type;
-       int payload_set;
-       int frozen;
+       bool payload_set;
+       bool frozen;
 };
 
 struct bt_ctf_field_integer {
@@ -63,7 +65,6 @@ struct bt_ctf_field_floating_point {
 
 struct bt_ctf_field_structure {
        struct bt_ctf_field parent;
-       GHashTable *field_name_to_index;
        GPtrArray *fields; /* Array of pointers to struct bt_ctf_field */
 };
 
@@ -89,13 +90,6 @@ struct bt_ctf_field_string {
        GString *payload;
 };
 
-/*
- * Set a field's value with an already allocated field instance.
- */
-BT_HIDDEN
-int bt_ctf_field_structure_set_field(struct bt_ctf_field *structure,
-               const char *name, struct bt_ctf_field *value);
-
 /* Validate that the field's payload is set (returns 0 if set). */
 BT_HIDDEN
 int bt_ctf_field_validate(struct bt_ctf_field *field);
@@ -113,6 +107,6 @@ BT_HIDDEN
 void bt_ctf_field_freeze(struct bt_ctf_field *field);
 
 BT_HIDDEN
-bool bt_ctf_field_is_set(struct bt_ctf_field *field);
+bt_bool bt_ctf_field_is_set(struct bt_ctf_field *field);
 
 #endif /* BABELTRACE_CTF_IR_FIELDS_INTERNAL_H */
This page took 0.036203 seconds and 4 git commands to generate.