PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ bytebuffer_get_buffer_copy()

uint8_t * bytebuffer_get_buffer_copy ( const bytebuffer_t s,
size_t *  buffer_length 
)

Returns a copy of the internal buffer.

Definition at line 105 of file bytebuffer.c.

106{
107 size_t bufsz = bytebuffer_getlength(s);
108 uint8_t *buf = lwalloc(bufsz);
109 memcpy(buf, s->buf_start, bufsz);
110 if ( buffer_length )
111 *buffer_length = bufsz;
112 return buf;
113}
size_t bytebuffer_getlength(const bytebuffer_t *s)
Returns the length of the current buffer.
Definition bytebuffer.c:177
char * s
Definition cu_in_wkt.c:23
void * lwalloc(size_t size)
Definition lwutil.c:227

References bytebuffer_getlength(), lwalloc(), and s.

Referenced by lwgeom_to_twkb_with_idlist().

Here is the call graph for this function:
Here is the caller graph for this function: