summaryrefslogtreecommitdiff
path: root/plugins/Variables
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables')
-rw-r--r--plugins/Variables/src/contact.cpp4
-rw-r--r--plugins/Variables/src/parse_alias.cpp5
-rw-r--r--plugins/Variables/src/tokenregister.cpp4
3 files changed, 3 insertions, 10 deletions
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index b5258b422f..da723406ce 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -82,7 +82,7 @@ typedef struct {
/* cache for 'getcontactfromstring' service */
static CONTACTCE *cce = NULL;
static int cacheSize = 0;
-static CRITICAL_SECTION csContactCache;
+static mir_cs csContactCache;
static HANDLE hContactSettingChangedHook;
@@ -397,7 +397,6 @@ static int contactSettingChanged(WPARAM hContact, LPARAM lParam)
int initContactModule()
{
- InitializeCriticalSection(&csContactCache);
hContactSettingChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, contactSettingChanged);
return 0;
}
@@ -405,7 +404,6 @@ int initContactModule()
int deinitContactModule()
{
UnhookEvent(hContactSettingChangedHook);
- DeleteCriticalSection(&csContactCache);
return 0;
}
diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp
index 13c771f128..a28f0d844c 100644
--- a/plugins/Variables/src/parse_alias.cpp
+++ b/plugins/Variables/src/parse_alias.cpp
@@ -28,7 +28,7 @@ struct ALIASREGISTER
};
static LIST<ALIASREGISTER> arAliases(5);
-static CRITICAL_SECTION csAliasRegister;
+static mir_cs csAliasRegister;
static ALIASREGISTER *searchAliasRegister(TCHAR *szAlias)
{
@@ -190,13 +190,10 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai)
void registerAliasTokens()
{
registerIntToken(ADDALIAS, parseAddAlias, TRF_FUNCTION | TRF_UNPARSEDARGS, LPGEN("Variables")"\t(x,y)\t"LPGEN("stores y as alias named x"));//TRF_UNPARSEDARGS);
- InitializeCriticalSection(&csAliasRegister);
}
void unregisterAliasTokens()
{
- DeleteCriticalSection(&csAliasRegister);
-
for (int i = 0; i < arAliases.getCount(); i++) {
ALIASREGISTER *p = arAliases[i];
for (unsigned j = 0; j < p->argc; j++)
diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp
index f4865e84e5..a4722f82d2 100644
--- a/plugins/Variables/src/tokenregister.cpp
+++ b/plugins/Variables/src/tokenregister.cpp
@@ -35,7 +35,7 @@ static int CompareTokens(const TokenRegisterEntry* p1, const TokenRegisterEntry*
static LIST<TokenRegisterEntry> tokens(100, CompareTokens);
-static CRITICAL_SECTION csRegister;
+static mir_cs csRegister;
unsigned long int hashlittle(void *key, size_t length, unsigned long int initval);
@@ -235,7 +235,6 @@ int getTokenRegisterCount()
int initTokenRegister()
{
- InitializeCriticalSection(&csRegister);
return 0;
}
@@ -259,6 +258,5 @@ int deinitTokenRegister()
}
tokens.destroy();
- DeleteCriticalSection(&csRegister);
return 0;
}