X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Flib%2Fplugin%2Fplugin.c;h=24b3aef9bbcc44a89bb301fec3c2bc5146c929d4;hp=aec5ed6837cb94378b173ad7c5a02245189b55d6;hb=7c7301d5827bd10ec7c34da7ffc5fe74e5047d38;hpb=7757f3190b7d08e5ecab5d50a9c74b19cb98dde0 diff --git a/src/lib/plugin/plugin.c b/src/lib/plugin/plugin.c index aec5ed68..24b3aef9 100644 --- a/src/lib/plugin/plugin.c +++ b/src/lib/plugin/plugin.c @@ -56,26 +56,31 @@ #define APPEND_ALL_FROM_DIR_NFDOPEN_MAX 8 +/* Declare here to make sure definition in both ifdef branches are in sync. */ +static +int init_python_plugin_provider(void); +typedef int (*create_all_from_file_sym_type)( + const char *path, + bool fail_on_load_error, + struct bt_plugin_set **plugin_set_out); + #ifdef BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT #include static -int (*bt_plugin_python_create_all_from_file_sym)( - const char *path, bool fail_on_load_error, - struct bt_plugin_set **plugin_set_out) = - bt_plugin_python_create_all_from_file; +create_all_from_file_sym_type + bt_plugin_python_create_all_from_file_sym = + bt_plugin_python_create_all_from_file; static -enum bt_plugin_status init_python_plugin_provider(void) +int init_python_plugin_provider(void) { } #else /* BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT */ static GModule *python_plugin_provider_module; static -int (*bt_plugin_python_create_all_from_file_sym)( - const char *path, bool fail_on_load_error, - struct bt_plugin_set **plugin_set_out); +create_all_from_file_sym_type bt_plugin_python_create_all_from_file_sym; static int init_python_plugin_provider(void) {