PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ bytebuffer_append_bytebuffer()

void bytebuffer_append_bytebuffer ( bytebuffer_t write_to,
bytebuffer_t write_from 
)

Writes a uint8_t value to the buffer.

Definition at line 224 of file bytebuffer.c.

References bytebuffer_t::buf_start, bytebuffer_getlength(), bytebuffer_makeroom(), LWDEBUG, and bytebuffer_t::writecursor.

Referenced by lwgeom_write_to_buffer(), and ptarray_to_twkb_buf().

225 {
226  LWDEBUG(2,"bytebuffer_append_bytebuffer");
227  size_t size = bytebuffer_getlength(write_from);
228  bytebuffer_makeroom(write_to, size);
229  memcpy(write_to->writecursor, write_from->buf_start, size);
230  write_to->writecursor += size;
231  return;
232 }
uint8_t * writecursor
Definition: bytebuffer.h:42
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
size_t bytebuffer_getlength(const bytebuffer_t *s)
Returns the length of the current buffer.
Definition: bytebuffer.c:377
uint8_t * buf_start
Definition: bytebuffer.h:41
static void bytebuffer_makeroom(bytebuffer_t *s, size_t size_to_add)
If necessary, expand the bytebuffer_t internal buffer to accomodate the specified additional size...
Definition: bytebuffer.c:140
Here is the call graph for this function:
Here is the caller graph for this function: