From: Vsevolod Stakhov Date: Sat, 28 May 2022 11:29:44 +0000 (+0100) Subject: [Minor] Change macro for C++ X-Git-Tag: 3.3~221 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f9ac76aa3c375dfcbd921756e2418384bd4726e6;p=rspamd.git [Minor] Change macro for C++ --- diff --git a/src/libutil/mem_pool.h b/src/libutil/mem_pool.h index a9f4fec98..72eb1740d 100644 --- a/src/libutil/mem_pool.h +++ b/src/libutil/mem_pool.h @@ -35,6 +35,12 @@ #include #endif +#ifdef __cplusplus +#define MEMPOOL_STR_FUNC __FUNCTION__ +#else +#define MEMPOOL_STR_FUNC G_STRFUNC +#endif + #ifdef __cplusplus extern "C" { #endif @@ -274,7 +280,7 @@ void rspamd_mempool_add_destructor_full (rspamd_mempool_t *pool, /* Macros for common usage */ #define rspamd_mempool_add_destructor(pool, func, data) \ - rspamd_mempool_add_destructor_full (pool, func, data, (G_STRFUNC), (G_STRLOC)) + rspamd_mempool_add_destructor_full (pool, func, data, (MEMPOOL_STR_FUNC), (G_STRLOC)) /** * Replace destructor callback to pool for specified pointer