Skip to content

Commit

Permalink
lib: append _FUNC to BT_PLUGIN_{INITIALIZE,FINALIZE}*
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ie643815f2ec07149025d864324e6aefc55a14cd5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2750
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
  • Loading branch information
eepp authored and jgalar committed Jan 20, 2020
1 parent e8961c8 commit 1906e01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions include/babeltrace2/plugin/plugin-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_
* _id: Plugin descriptor ID (C identifier).
* _x: Initialization function (bt_plugin_initialize_func).
*/
#define BT_PLUGIN_INITIALIZE_WITH_ID(_id, _x) \
#define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _x) \
__BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)

/*
Expand All @@ -453,7 +453,7 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_
* _id: Plugin descriptor ID (C identifier).
* _x: Exit function (bt_plugin_finalize_func).
*/
#define BT_PLUGIN_FINALIZE_WITH_ID(_id, _x) \
#define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _x) \
__BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)

/*
Expand Down Expand Up @@ -954,15 +954,15 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_
*
* _x: Initialization function (bt_plugin_initialize_func).
*/
#define BT_PLUGIN_INITIALIZE(_x) BT_PLUGIN_INITIALIZE_WITH_ID(auto, _x)
#define BT_PLUGIN_INITIALIZE_FUNC(_x) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _x)

/*
* Defines a plugin exit function attribute attached to the automatic
* plugin descriptor.
*
* _x: Exit function (bt_plugin_finalize_func).
*/
#define BT_PLUGIN_FINALIZE(_x) BT_PLUGIN_FINALIZE_WITH_ID(auto, _x)
#define BT_PLUGIN_FINALIZE_FUNC(_x) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _x)

/*
* Defines an author attribute attached to the automatic plugin
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/test-plugin-plugins/minimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ BT_PLUGIN(test_minimal);
BT_PLUGIN_DESCRIPTION("Minimal Babeltrace plugin with no component classes");
BT_PLUGIN_AUTHOR("Janine Sutto");
BT_PLUGIN_LICENSE("Beerware");
BT_PLUGIN_INITIALIZE(plugin_init);
BT_PLUGIN_FINALIZE(plugin_finalize);
BT_PLUGIN_INITIALIZE_FUNC(plugin_init);
BT_PLUGIN_FINALIZE_FUNC(plugin_finalize);

0 comments on commit 1906e01

Please sign in to comment.