Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX(plugins): Compilation with new unified header #6268

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/MumblePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down Expand Up @@ -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_
5 changes: 2 additions & 3 deletions plugins/deadLockPlugin/deadLockPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@

// 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 <condition_variable>
#include <cstring>
#include <iostream>
#include <mutex>
#include <thread>

MumbleAPI_v_1_0_x mumAPI;
MumbleAPI mumAPI;
mumble_connection_t activeConnection;
mumble_plugin_id_t ownID;
std::mutex dummyMutex;
Expand Down
3 changes: 1 addition & 2 deletions plugins/testPlugin/testPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cstring>
#include <iostream>
Expand Down
Loading