}
//printBYTES((unsigned char *)result, size);
- *retsize = size;
+ if (retsize) *retsize = size;
}
// find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN)
else if (point->ndims == 2) getPoint2d_p(point->point, 0, loc);
else if (point->ndims == 4) getPoint4d_p(point->point, 0, loc);
- *retsize = size;
+ if (retsize) *retsize = size;
}
// find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN)
}
}
- *retsize = size;
+ if (retsize) *retsize = size;
}
memcpy(buf, &ngeoms, 4);
- *retsize = lwgeom_empty_length(SRID);
+ if (retsize) *retsize = lwgeom_empty_length(SRID);
}
// helper function (not for general use)
int size = lwexploded_findlength(exploded, wantbbox);
char *result = palloc(size);
lwexploded_serialize_buf(exploded, wantbbox, result, &sizecom);
- elog(NOTICE, "findlength:%d, serialize_buf:%d", size, sizecom);
+#ifdef DEBUG
+ elog(NOTICE, "lwexploded_serialize: findlength:%d, serialize_buf:%d", size, sizecom);
+#endif
return result;
}
}
else {
- *retsize = 0;
+ if ( retsize ) *retsize = 0;
return; // ERROR !!
}
size += sizeof(BOX2DFLOAT4);
}
- *retsize = size;
+ if (retsize) *retsize = size;
return;
}
}
// Register now the number of written bytes
- *retsize = (loc-buf);
+ if (retsize) *retsize = (loc-buf);
// Ok. now we need to add type, SRID and bbox
buf[0] = lwgeom_makeType_full(exploded->ndims,