Declare wrbuf_free again
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 10 Jul 2009 12:36:51 +0000 (14:36 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 10 Jul 2009 12:36:51 +0000 (14:36 +0200)
include/yaz/wrbuf.h
src/wrbuf.c

index 56a4023..04774fd 100644 (file)
@@ -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);
 
index f90764a..aa653f7 100644 (file)
@@ -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);