Rename bt_ctf_X -> bt_X, maintain backward compat. for pre-2.0 CTF writer
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 22 Sep 2017 00:51:34 +0000 (20:51 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 2 Nov 2017 18:39:07 +0000 (14:39 -0400)
This patch replaces the `bt_ctf_` prefix with `bt_` for all the
functions, types, and enumerations. It also replaces the `BT_CTF_`
prefix with `BT_` for all the preprocessor definitions and enumerators.

Since there is only one IR as of Babeltrace 2, there is no need for this
superfluous prefix: there's no confusion without it, and it might even
be more straightforward for the newcomer to see `bt_trace` instead of
`bt_ctf_trace`, for example.

Backward compatibility is maintained with the help of specific
preprocessor definitions placed in each relevant public header file to
create aliases for legacy function names, type names, enumerator names,
and preprocessor definition names. Because Babeltrace 2 asks current
applications to be rebuilt anyway (soname is bumped), it is okay to lose
some symbol names as long as the API is equivalent.

The only possible issue that I can see is if an application uses a new
API name as a variable name, for example:

    struct bt_ctf_trace bt_ctf_trace;
    struct something_else bt_trace;

This is an error after this patch is applied because, after the
preprocessor pass, it is the equivalent of:

    struct bt_trace bt_trace;
    struct something_else bt_trace;

because of (include/babeltrace/ctf-ir/trace.h):

    #define bt_ctf_trace bt_trace

which affects both the type name and the variable name. This should not
be a problem in most cases, and it is easy to fix otherwise.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.026737 seconds and 4 git commands to generate.