PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ wkb_swap_bytes()

static int wkb_swap_bytes ( uint8_t  variant)
inlinestatic

Definition at line 182 of file lwout_wkb.c.

183 {
184  /* If requested variant matches machine arch, we don't have to swap! */
185  if ( ((variant & WKB_NDR) && (getMachineEndian() == NDR)) ||
186  ((! (variant & WKB_NDR)) && (getMachineEndian() == XDR)) )
187  {
188  return LW_FALSE;
189  }
190  return LW_TRUE;
191 }
static uint8_t variant
Definition: cu_in_twkb.c:26
#define LW_FALSE
Definition: liblwgeom.h:77
#define WKB_NDR
Definition: liblwgeom.h:2069
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
char getMachineEndian(void)
Definition: lwutil.c:327
#define NDR
#define XDR

References getMachineEndian(), LW_FALSE, LW_TRUE, NDR, variant, WKB_NDR, and XDR.

Referenced by double_to_wkb_buf(), integer_to_wkb_buf(), and ptarray_to_wkb_buf().

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