From: <ps...@us...> - 2009-11-15 13:29:30
|
Revision: 1661 http://znc.svn.sourceforge.net/znc/?rev=1661&view=rev Author: psychon Date: 2009-11-15 13:29:17 +0000 (Sun, 15 Nov 2009) Log Message: ----------- Module ABI: Use a string pointer Returning a const char* is way easier, makes way more sense and is way friendlier for an extern "C" function. Modified Paths: -------------- trunk/Modules.h Modified: trunk/Modules.h =================================================================== --- trunk/Modules.h 2009-11-15 13:03:48 UTC (rev 1660) +++ trunk/Modules.h 2009-11-15 13:29:17 UTC (rev 1661) @@ -45,13 +45,13 @@ #define MODULEDEFS(CLASS, DESCRIPTION) \ extern "C" { \ /* First the definitions to shut up some compiler warnings */ \ - CString ZNCModDescription(); \ + const char *ZNCModDescription(); \ bool ZNCModGlobal(); \ double ZNCModVersion(); \ CModule* ZNCModLoad(ModHandle p, CUser* pUser, const CString& sModName, \ const CString& sModPath); \ void ZNCModUnload(CModule* pMod); \ - CString ZNCModDescription() { return DESCRIPTION; } \ + const char *ZNCModDescription() { return DESCRIPTION; } \ bool ZNCModGlobal() { return false; } \ double ZNCModVersion() { return VERSION; } \ CModule* ZNCModLoad(ModHandle p, CUser* pUser, const CString& sModName, \ @@ -68,13 +68,13 @@ #define GLOBALMODULEDEFS(CLASS, DESCRIPTION) \ extern "C" { \ /* First the definitions to shut up some compiler warnings */ \ - CString ZNCModDescription(); \ + const char *ZNCModDescription(); \ bool ZNCModGlobal(); \ double ZNCModVersion(); \ CGlobalModule* ZNCModLoad(ModHandle p, const CString& sModName, \ const CString& sModPath); \ void ZNCModUnload(CGlobalModule* pMod); \ - CString ZNCModDescription() { return DESCRIPTION; } \ + const char *ZNCModDescription() { return DESCRIPTION; } \ bool ZNCModGlobal() { return true; } \ double ZNCModVersion() { return VERSION; } \ CGlobalModule* ZNCModLoad(ModHandle p, const CString& sModName, \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |