diff --git a/plugins/MumblePlugin.h b/plugins/MumblePlugin.h index 7726f78583d..a2592f7ce85 100644 --- a/plugins/MumblePlugin.h +++ b/plugins/MumblePlugin.h @@ -1211,6 +1211,9 @@ mumble_version_t mumble_getPluginFunctionsVersion() { MUMBLE_ECONCAT(MUMBLE_ECONCAT(MumbleAPI_v, MUMBLE_PLUGIN_API_MAJOR_MACRO), MUMBLE_PLUGIN_API_MINOR_MACRO), \ x) +# undef MUMBLE_API_CAST +# define MUMBLE_API_CAST(ptr) (*((MUMBLE_API_STRUCT_NAME *) ptr)) + // Define some helper macros to make version-specific changes to the API functions # define SELECTED_API_VERSION \ MUMBLE_PLUGIN_VERSION_CHECK(MUMBLE_PLUGIN_API_MAJOR_MACRO, MUMBLE_PLUGIN_API_MINOR_MACRO, \ @@ -1811,10 +1814,10 @@ struct MUMBLE_API_STRUCT_NAME { * Typedef for the Mumble API struct for convenient (unversioned) access */ typedef struct MUMBLE_API_STRUCT_NAME MumbleAPI; +typedef struct MUMBLE_API_STRUCT_NAME mumble_api_t; # endif # undef SELECTED_API_VERSION -# undef MUMBLE_API_STRUCT_NAME # undef PARAM_v1_2 #endif // EXTERNAL_MUMBLE_PLUGIN_MUMBLE_API_ diff --git a/plugins/deadLockPlugin/deadLockPlugin.cpp b/plugins/deadLockPlugin/deadLockPlugin.cpp index ee19662585e..b1edfe3e1ba 100644 --- a/plugins/deadLockPlugin/deadLockPlugin.cpp +++ b/plugins/deadLockPlugin/deadLockPlugin.cpp @@ -5,8 +5,7 @@ // Include the definitions of the plugin functions // Not that this will also include ../PluginComponents.h -#include "../MumbleAPI_v_1_0_x.h" -#include "../MumblePlugin_v_1_0_x.h" +#include "../MumblePlugin.h" #include #include @@ -14,7 +13,7 @@ #include #include -MumbleAPI_v_1_0_x mumAPI; +MumbleAPI mumAPI; mumble_connection_t activeConnection; mumble_plugin_id_t ownID; std::mutex dummyMutex; diff --git a/plugins/testPlugin/testPlugin.cpp b/plugins/testPlugin/testPlugin.cpp index f8938f96846..f6da385d58f 100644 --- a/plugins/testPlugin/testPlugin.cpp +++ b/plugins/testPlugin/testPlugin.cpp @@ -5,8 +5,7 @@ // Include the definitions of the plugin functions // Not that this will also include ../PluginComponents.h -#include "../MumbleAPI_v_1_0_x.h" -#include "../MumblePlugin_v_1_0_x.h" +#include "../MumblePlugin.h" #include #include