Dynamically growing buffer. More...
#include <gnunet_buffer_lib.h>
Data Fields | |
size_t | capacity |
Capacity of the buffer. More... | |
size_t | position |
Current write position. More... | |
char * | mem |
Backing memory. More... | |
int | warn_grow |
Log a warning if the buffer is grown over its initially allocated capacity. More... | |
Dynamically growing buffer.
Can be used to construct strings and other objects with dynamic size.
This structure should, in most cases, be stack-allocated and zero-initialized, like:
struct GNUNET_Buffer my_buffer = { 0 };
Definition at line 47 of file gnunet_buffer_lib.h.
size_t GNUNET_Buffer::capacity |
Capacity of the buffer.
Definition at line 52 of file gnunet_buffer_lib.h.
size_t GNUNET_Buffer::position |
Current write position.
Definition at line 57 of file gnunet_buffer_lib.h.
char* GNUNET_Buffer::mem |
Backing memory.
Definition at line 62 of file gnunet_buffer_lib.h.
int GNUNET_Buffer::warn_grow |
Log a warning if the buffer is grown over its initially allocated capacity.
Definition at line 67 of file gnunet_buffer_lib.h.