From: Martin Mares Date: Mon, 29 Aug 2005 16:43:51 +0000 (+0000) Subject: Even better GBUF_TRACE -- the caller supplies his own logging function. X-Git-Tag: holmes-import~751 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e7deac4e1c25fba13d8c3c3929c4e18e8f8a0d21;p=libucw.git Even better GBUF_TRACE -- the caller supplies his own logging function. Also documented the new switch. --- diff --git a/lib/gbuf.h b/lib/gbuf.h index d202adb6..a188f5d0 100644 --- a/lib/gbuf.h +++ b/lib/gbuf.h @@ -8,6 +8,7 @@ * * GBUF_TYPE data type of records stored in the buffer * GBUF_PREFIX(x) add a name prefix to all global symbols + * GBUF_TRACE(msg...) log growing of buffer [optional] * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -46,7 +47,7 @@ GBUF_PREFIX(realloc)(BUF_T *b, uns len) b->len = len; b->ptr = xrealloc(b->ptr, len * sizeof(GBUF_TYPE)); #ifdef GBUF_TRACE - log(L_DEBUG, STRINGIFY_EXPANDED(BUF_T) " growing to %u items", len); + GBUF_TRACE(STRINGIFY_EXPANDED(BUF_T) " growing to %u items", len); #endif }