From 3f855f07f5d2e9a08a586436719358c40a46f29d Mon Sep 17 00:00:00 2001 From: TingPing Date: Sun, 28 Dec 2014 06:08:20 -0500 Subject: Use glib for allocations in all plugins Continuation of 83032b1aa --- plugins/mpcinfo/functions.c | 6 ++++-- plugins/mpcinfo/mpcInfo.c | 27 +++++++++++++++++++-------- plugins/mpcinfo/mpcinfo.vcxproj | 8 ++++++-- 3 files changed, 29 insertions(+), 12 deletions(-) (limited to 'plugins/mpcinfo') diff --git a/plugins/mpcinfo/functions.c b/plugins/mpcinfo/functions.c index de2e8a40..e5993948 100644 --- a/plugins/mpcinfo/functions.c +++ b/plugins/mpcinfo/functions.c @@ -14,6 +14,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + char *split(char *text, char separator) { int pos = -1; @@ -67,7 +69,7 @@ int inStr(char *s1, size_t sl1, char *s2) static char *subString(char *text, int first, int length, int spcKill){ //if (DEBUG==1) putlog("creating substring"); - char *ret=(char*) calloc (length+1,sizeof(char)); //malloc(sizeof(char)*(length+1)); + char *ret = g_new (char, length + 1); int i; ret[length]=0; for (i=0;itrue WIN32;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions) true - ..\..\src\common;%(AdditionalIncludeDirectories) + ..\..\src\common;$(Glib);%(AdditionalIncludeDirectories) Windows true true true + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) mpcinfo.def @@ -81,13 +83,15 @@ true WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions) true - ..\..\src\common;%(AdditionalIncludeDirectories) + ..\..\src\common;$(Glib);%(AdditionalIncludeDirectories) Windows true true true + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + $(DepLibs);%(AdditionalDependencies) mpcinfo.def -- cgit 1.4.1