lib: Reset libbabeltrace2 to SONANE 0
[babeltrace.git] / include / babeltrace / ctf-writer / values-internal.h
index 332626f2e557044ed25babdf40f1c73e1f1f280a..4cd74e1bd866eceeb94373ec3888518ae8b73284 100644 (file)
@@ -52,7 +52,7 @@ enum bt_ctf_value_status _bt_ctf_value_freeze(struct bt_ctf_value *object);
 # define bt_ctf_value_freeze(_value)
 #endif /* BT_DEV_MODE */
 
-struct bt_ctf_value *bt_ctf_value_null;
+extern struct bt_ctf_value *const bt_ctf_value_null;
 
 enum bt_ctf_value_type {
        /// Null value object.
@@ -190,7 +190,7 @@ enum bt_ctf_value_status bt_ctf_value_map_extend(
 struct bt_ctf_value;
 struct bt_ctf_private_value;
 
-struct bt_ctf_private_value *bt_ctf_private_value_null;
+extern struct bt_ctf_private_value *const bt_ctf_private_value_null;
 
 static inline
 struct bt_ctf_value *bt_ctf_private_value_as_value(
@@ -331,4 +331,27 @@ BT_HIDDEN
 enum bt_ctf_value_status bt_ctf_private_value_map_insert_empty_map_entry(
                struct bt_ctf_private_value *map_obj, const char *key);
 
+static inline
+const char *bt_ctf_value_type_string(enum bt_ctf_value_type type)
+{
+       switch (type) {
+       case BT_CTF_VALUE_TYPE_NULL:
+               return "BT_CTF_VALUE_TYPE_NULL";
+       case BT_CTF_VALUE_TYPE_BOOL:
+               return "BT_CTF_VALUE_TYPE_BOOL";
+       case BT_CTF_VALUE_TYPE_INTEGER:
+               return "BT_CTF_VALUE_TYPE_INTEGER";
+       case BT_CTF_VALUE_TYPE_REAL:
+               return "BT_CTF_VALUE_TYPE_REAL";
+       case BT_CTF_VALUE_TYPE_STRING:
+               return "BT_CTF_VALUE_TYPE_STRING";
+       case BT_CTF_VALUE_TYPE_ARRAY:
+               return "BT_CTF_VALUE_TYPE_ARRAY";
+       case BT_CTF_VALUE_TYPE_MAP:
+               return "BT_CTF_VALUE_TYPE_MAP";
+       default:
+               return "(unknown)";
+       }
+};
+
 #endif /* BABELTRACE_CTF_WRITER_VALUES_INTERNAL_H */
This page took 0.023674 seconds and 4 git commands to generate.