1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-02 06:40:12 +01:00

Complementary un-registration of providers; change function name

This commit is contained in:
Paul Licameli
2020-10-02 14:30:53 -04:00
parent 64bbc31c54
commit 861470dd77
3 changed files with 28 additions and 4 deletions

View File

@@ -164,12 +164,15 @@ static ModuleInterface * name(const wxString *path)
// Provides the base for embedded module registration. If used, a Register()
// method must be supplied explicitly.
// ----------------------------------------------------------------------------
#define DECLARE_BUILTIN_MODULE_BASE(name) \
class name \
{ \
public: \
name() {Register();} \
~name() {Unregister();} \
void Register(); \
void Unregister(); \
}; \
static name name ## _instance;
@@ -181,7 +184,11 @@ static name name ## _instance;
DECLARE_BUILTIN_MODULE_BASE(name) \
void name::Register() \
{ \
RegisterBuiltinModule(MODULE_ENTRY); \
RegisterProvider(MODULE_ENTRY); \
} \
void name::Unregister() \
{ \
UnregisterProvider(MODULE_ENTRY); \
}
#else