PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t gserialized_is_empty_recurse ( const uint8_t *  p,
int *  isempty 
)
static

Definition at line 113 of file g_serialized.c.

References LW_FALSE, LW_TRUE, and lwtype_is_collection().

Referenced by gserialized_is_empty().

114 {
115  int i;
116  int32_t type, num;
117 
118  memcpy(&type, p, 4);
119  memcpy(&num, p+4, 4);
120 
121  if ( lwtype_is_collection(type) )
122  {
123  size_t lz = 8;
124  for ( i = 0; i < num; i++ )
125  {
126  lz += gserialized_is_empty_recurse(p+lz, isempty);
127  if ( ! *isempty )
128  return lz;
129  }
130  *isempty = LW_TRUE;
131  return lz;
132  }
133  else
134  {
135  *isempty = (num == 0 ? LW_TRUE : LW_FALSE);
136  return 8;
137  }
138 }
static size_t gserialized_is_empty_recurse(const uint8_t *p, int *isempty)
Definition: g_serialized.c:113
#define LW_FALSE
Definition: liblwgeom.h:52
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:51
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
Definition: lwgeom.c:955

Here is the call graph for this function:

Here is the caller graph for this function: