1 // This file is under GNU General Public License 3.0
15 // this is a growing buffer, which is needed by the ASN.1 implementation
16 // i.e. for encoding to XER
18 typedef struct growing_buf {
24 // new_growing_buf() - allocate a new growing buffer
27 // new buffer or NULL if out of memory
29 growing_buf_t *new_growing_buf(void);
32 // free_growing_buf() - free growing buffer
35 // buf (in) buffer to free
37 void free_growing_buf(growing_buf_t *buf);
40 // growing_buf_consume() - append new data to growing buffer
44 // size (in) size of new data
45 // dst (in) growing buffer where new data will be appended
48 // 1 on succes, -1 on failure
50 int growing_buf_consume(const void *src, size_t size, growing_buf_t *dst);