PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ twkb_parse_state_varint_skip()

static void twkb_parse_state_varint_skip ( twkb_parse_state s)
inlinestatic

Definition at line 103 of file lwin_twkb.c.

References lwerror(), twkb_parse_state::pos, twkb_parse_state::twkb_end, twkb_parse_state_advance(), and varint_size().

Referenced by lwcollection_from_twkb_state(), lwmultiline_from_twkb_state(), lwmultipoint_from_twkb_state(), and lwmultipoly_from_twkb_state().

104 {
105  size_t size = varint_size(s->pos, s->twkb_end);
106 
107  if ( ! size )
108  lwerror("%s: no varint to skip", __func__);
109 
110  twkb_parse_state_advance(s, size);
111  return;
112 }
uint8_t * pos
Definition: lwin_twkb.c:27
uint8_t * twkb_end
Definition: lwin_twkb.c:26
size_t varint_size(const uint8_t *the_start, const uint8_t *the_end)
Definition: varint.c:139
static void twkb_parse_state_advance(twkb_parse_state *s, size_t next)
Check that we are not about to read off the end of the WKB array.
Definition: lwin_twkb.c:68
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
Here is the call graph for this function:
Here is the caller graph for this function: