PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gserialized2_is_empty_recurse()

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

Definition at line 225 of file gserialized2.c.

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