PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized2_is_empty_recurse()

static size_t gserialized2_is_empty_recurse ( const uint8_t *  p,
int *  isempty 
)
static

Definition at line 224 of file gserialized2.c.

225 {
226  int i;
227  int32_t type, num;
228 
229  memcpy(&type, p, 4);
230  memcpy(&num, p+4, 4);
231 
233  {
234  size_t lz = 8;
235  for ( i = 0; i < num; i++ )
236  {
237  lz += gserialized2_is_empty_recurse(p+lz, isempty);
238  if (!*isempty)
239  return lz;
240  }
241  *isempty = LW_TRUE;
242  return lz;
243  }
244  else
245  {
246  *isempty = (num == 0 ? LW_TRUE : LW_FALSE);
247  return 8;
248  }
249 }
static size_t gserialized2_is_empty_recurse(const uint8_t *p, int *isempty)
Definition: gserialized2.c:224
#define LW_FALSE
Definition: liblwgeom.h:108
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
Definition: lwgeom.c:1087
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:107
type
Definition: ovdump.py:42

References LW_FALSE, LW_TRUE, lwtype_is_collection(), and ovdump::type.

Referenced by gserialized2_is_empty().

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