From: Adam Dickmeiss Date: Fri, 10 Jul 2009 12:36:51 +0000 (+0200) Subject: Declare wrbuf_free again X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=fa4caf46a80e18acf7db8f1c8c6df233984c1fd2;p=yaz-moved-to-github.git Declare wrbuf_free again --- diff --git a/include/yaz/wrbuf.h b/include/yaz/wrbuf.h index 56a4023..04774fd 100644 --- a/include/yaz/wrbuf.h +++ b/include/yaz/wrbuf.h @@ -50,6 +50,9 @@ typedef struct wrbuf /** \brief allocate / construct WRBUF */ YAZ_EXPORT WRBUF wrbuf_alloc(void); +/** \brief free WRBUF and possibly its buffer */ +YAZ_EXPORT void wrbuf_free(WRBUF b, int free_buf); + /** \brief destroy WRBUF and its buffer */ YAZ_EXPORT void wrbuf_destroy(WRBUF b); diff --git a/src/wrbuf.c b/src/wrbuf.c index f90764a..aa653f7 100644 --- a/src/wrbuf.c +++ b/src/wrbuf.c @@ -35,6 +35,11 @@ WRBUF wrbuf_alloc(void) return n; } +void wrbuf_free(WRBUF b, int x) +{ + return wrbuf_destroy(b); +} + void wrbuf_destroy(WRBUF b) { xfree(b->buf);