From: Francesco Chemolli Date: Fri, 20 Nov 2009 13:59:35 +0000 (+0100) Subject: Forward-ported CBDATA_DEBUG cpp fix from 3.1 X-Git-Tag: SQUID_3_2_0_1~550 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5a06e138e852f4b8b10c13697e3ad8ab1e0089f;p=thirdparty%2Fsquid.git Forward-ported CBDATA_DEBUG cpp fix from 3.1 --- diff --git a/src/cbdata.h b/src/cbdata.h index 617f3dfac8..05b920d7de 100644 --- a/src/cbdata.h +++ b/src/cbdata.h @@ -285,6 +285,7 @@ extern cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, in #define cbdataInternalUnlock(a) cbdataInternalUnlockDbg(a,__FILE__,__LINE__) #define cbdataReferenceValidDone(var, ptr) cbdataInternalReferenceDoneValidDbg((void **)&(var), (ptr), __FILE__,__LINE__) #define CBDATA_CLASS2(type) \ + private: \ static cbdata_type CBDATA_##type; \ public: \ void *operator new(size_t size) { \ @@ -295,9 +296,8 @@ extern cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, in void operator delete (void *address) { \ if (address) cbdataInternalFreeDbg(address,__FILE__,__LINE__); \ } \ - void *toCbdata() { return this; } \ - private: -#else + void *toCbdata() { return this; } +#else /* CBDATA_DEBUG */ /** \ingroup CBDATAAPI