PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ byte_from_wkb_state()

static char byte_from_wkb_state ( wkb_parse_state s)
static

Byte Read a byte and advance the parse state forward.

Definition at line 257 of file lwin_wkb.c.

258 {
259  char char_value = 0;
260  LWDEBUG(4, "Entered function");
261 
263  if (s->error)
264  return 0;
265  LWDEBUG(4, "Passed state check");
266 
267  char_value = s->pos[0];
268  LWDEBUGF(4, "Read byte value: %x", char_value);
269  s->pos += WKB_BYTE_SIZE;
270 
271  return char_value;
272 }
char * s
Definition: cu_in_wkt.c:23
#define WKB_BYTE_SIZE
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
static void wkb_parse_state_check(wkb_parse_state *s, size_t next)
Check that we are not about to read off the end of the WKB array.
Definition: lwin_wkb.c:131

References LWDEBUG, LWDEBUGF, s, WKB_BYTE_SIZE, and wkb_parse_state_check().

Referenced by lwgeom_from_wkb_state().

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