diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-30 16:17:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-30 16:17:46 +0000 |
commit | 7dad3543a2b848f6547b291f812c9643dc0b85f2 (patch) | |
tree | 1054ad62ecba19750bb4531f34e9d033ac1b7244 /plugins/ExternalAPI | |
parent | 008fe34954b0bda8fd3487a9658c14581ecd813a (diff) |
Variables moved to mir_* memory allocation routines
git-svn-id: http://svn.miranda-ng.org/main/trunk@696 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_variables.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/ExternalAPI/m_variables.h b/plugins/ExternalAPI/m_variables.h index 77571f5522..52c3081d08 100644 --- a/plugins/ExternalAPI/m_variables.h +++ b/plugins/ExternalAPI/m_variables.h @@ -21,15 +21,19 @@ #define __M_VARS
#if !defined(_TCHAR_DEFINED)
-#include <tchar.h>
+ #include <tchar.h>
+#endif
+
+#if !defined(M_CORE_H__)
+ #include <m_core.h>
#endif
#ifndef VARIABLES_NOHELPER
-#include <m_button.h>
+ #include <m_button.h>
#endif
#ifndef SIZEOF
-#include <win2k.h>
+ #include <win2k.h>
#endif
// --------------------------------------------------------------------------
@@ -190,12 +194,12 @@ __inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, fi.flags |= FIF_TCHAR;
tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
if (tszParsed) {
- tszResult = _tcsdup(tszParsed);
+ tszResult = mir_tstrdup(tszParsed);
CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
return tszResult;
}
}
- return tszFormat?_tcsdup(tszFormat):tszFormat;
+ return tszFormat?mir_tstrdup(tszFormat):tszFormat;
}
__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
@@ -215,12 +219,12 @@ __inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraTe fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
if (tszParsed) {
- tszResult = _tcsdup(tszParsed);
+ tszResult = mir_tstrdup(tszParsed);
CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
return tszResult;
}
}
- return tszFormat?_tcsdup(tszFormat):tszFormat;
+ return tszFormat?mir_tstrdup(tszFormat):tszFormat;
}
#endif
|