Fix: headers: add missing end of `extern "C"` curly brackets (for C++)
[babeltrace.git] / include / babeltrace / ctf-writer / event-fields.h
index ce13907a13b827c341ed162b41560db02350fe9f..f99f6812020a1789b29ac105cbc3056165ca445a 100644 (file)
@@ -2,8 +2,6 @@
 #define BABELTRACE_CTF_WRITER_EVENT_FIELDS_H
 
 /*
- * BabelTrace - CTF Writer: Event Fields
- *
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
@@ -30,7 +28,9 @@
  * http://www.efficios.com/ctf
  */
 
-#include <babeltrace/ctf-ir/fields.h>
+#include <babeltrace/ctf-writer/object.h>
+#include <babeltrace/ctf-writer/field-types.h>
+#include <babeltrace/ctf-writer/fields.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -40,7 +40,7 @@ extern "C" {
  * bt_ctf_field_get and bt_ctf_field_put: increment and decrement the
  * field's reference count.
  *
- * You may also use bt_ctf_get() and bt_ctf_put() with field objects.
+ * You may also use bt_ctf_object_get_ref() and bt_ctf_object_put_ref() with field objects.
  *
  * These functions ensure that the field won't be destroyed when it
  * is in use. The same number of get and put (plus one extra put to
@@ -52,8 +52,20 @@ extern "C" {
  *
  * @param field Field instance.
  */
-extern void bt_ctf_field_get(struct bt_ctf_field *field);
-extern void bt_ctf_field_put(struct bt_ctf_field *field);
+
+/* Pre-2.0 CTF writer compatibility */
+static inline
+void bt_ctf_field_get(struct bt_ctf_field *field)
+{
+       bt_ctf_object_get_ref(field);
+}
+
+/* Pre-2.0 CTF writer compatibility */
+static inline
+void bt_ctf_field_put(struct bt_ctf_field *field)
+{
+       bt_ctf_object_put_ref(field);
+}
 
 #ifdef __cplusplus
 }
This page took 0.024407 seconds and 4 git commands to generate.