From 7dad3543a2b848f6547b291f812c9643dc0b85f2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Jun 2012 16:17:46 +0000 Subject: Variables moved to mir_* memory allocation routines git-svn-id: http://svn.miranda-ng.org/main/trunk@696 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ExternalAPI/m_variables.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'plugins/ExternalAPI') 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 + #include +#endif + +#if !defined(M_CORE_H__) + #include #endif #ifndef VARIABLES_NOHELPER -#include + #include #endif #ifndef SIZEOF -#include + #include #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 -- cgit v1.2.3