PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int wkb_swap_bytes ( uint8_t  variant)
inlinestatic

Definition at line 166 of file lwout_wkb.c.

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

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

167 {
168  /* If requested variant matches machine arch, we don't have to swap! */
169  if ( ((variant & WKB_NDR) && (getMachineEndian() == NDR)) ||
170  ((! (variant & WKB_NDR)) && (getMachineEndian() == XDR)) )
171  {
172  return LW_FALSE;
173  }
174  return LW_TRUE;
175 }
#define WKB_NDR
Definition: liblwgeom.h:1770
#define NDR
#define LW_FALSE
Definition: liblwgeom.h:52
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:51
char getMachineEndian(void)
Definition: lwutil.c:306
#define XDR

Here is the call graph for this function:

Here is the caller graph for this function: