From d96d16634bef030a01b226608d047a5a0f756d48 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 15 Nov 2009 13:29:17 +0000 Subject: [PATCH] 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. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1661 726aef4b-f618-498e-8847-2d620e286838 --- Modules.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules.h b/Modules.h index e6780dae..a9b7ed98 100644 --- a/Modules.h +++ b/Modules.h @@ -45,13 +45,13 @@ typedef void* ModHandle; #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 @@ typedef void* ModHandle; #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, \