X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-writer%2Fevent-fields.h;h=e06c354c50659a6f07be4161b194ba668c7e5c43;hb=3dca22768a95bef664012559aa9ac977091de6ac;hp=ce13907a13b827c341ed162b41560db02350fe9f;hpb=8c18d80b69a10f94980d33e6f1c1bdb26b447487;p=babeltrace.git diff --git a/include/babeltrace/ctf-writer/event-fields.h b/include/babeltrace/ctf-writer/event-fields.h index ce13907a..e06c354c 100644 --- a/include/babeltrace/ctf-writer/event-fields.h +++ b/include/babeltrace/ctf-writer/event-fields.h @@ -30,7 +30,9 @@ * http://www.efficios.com/ctf */ -#include +#include +#include +#include #ifdef __cplusplus extern "C" { @@ -40,7 +42,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_get() and bt_put() 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 +54,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_field *field) +{ + bt_get(field); +} + +/* Pre-2.0 CTF writer compatibility */ +static inline +void bt_ctf_field_put(struct bt_field *field) +{ + bt_put(field); +} #ifdef __cplusplus }