assert(point);
- if ( point->bbox )
- {
- size += TYPE_NDIMS(point->type) * sizeof(double) * 2;
- }
-
size += 4; /* Number of points (one or zero (empty)). */
size += point->point->npoints * TYPE_NDIMS(point->type) * sizeof(double);
size_t size = 4; /* Type number. */
assert(line);
-
- if ( line->bbox )
- {
- size += TYPE_NDIMS(line->type) * sizeof(double) * 2;
- }
size += 4; /* Number of points (zero => empty). */
size += line->points->npoints * TYPE_NDIMS(line->type) * sizeof(double);
assert(poly);
- if ( poly->bbox )
- {
- size += TYPE_NDIMS(poly->type) * sizeof(double) * 2;
- }
-
size += 4; /* Number of rings (zero => empty). */
if( poly->nrings % 2 )
size += 4; /* Padding to double alignment. */
assert(curve);
- if ( curve->bbox )
- {
- size += TYPE_NDIMS(curve->type) * sizeof(double) * 2;
- }
-
size += 4; /* Number of points (zero => empty). */
size += curve->points->npoints * TYPE_NDIMS(curve->type) * sizeof(double);
assert(col);
- if ( col->bbox )
- {
- size += TYPE_NDIMS(col->type) * sizeof(double) * 2;
- }
-
size += 4; /* Number of sub-geometries (zero => empty). */
for( i = 0; i < col->ngeoms; i++ )
{
uchar *loc;
float f;
+ size_t return_size;
assert(buf);
memcpy(loc, &f, sizeof(float));
loc += sizeof(float);
- return (size_t)(loc - buf);
+ return_size = (size_t)(loc - buf);
+ LWDEBUGF(4, "returning size %d", return_size);
+ return return_size;
}
if( FLAGS_GET_Z(gbox.flags) )
memcpy(loc, &f, sizeof(float));
loc += sizeof(float);
}
- return (size_t)(loc - buf);
+ return_size = (size_t)(loc - buf);
+ LWDEBUGF(4, "returning size %d", return_size);
+ return return_size;
}
/* Public function */
POSTGIS_DEBUGF(3, " %d bytes allocated for array", (int)nbytes);
POSTGIS_DEBUGF(3, " array start @ %p", (void*)result);
- POSTGIS_DEBUGF(3, " ARR_DATA_PTR @ %p (%d)",
+ POSTGIS_DEBUGF(3, " ARR_DATA_PTR @ %p (%ld)",
ARR_DATA_PTR(result), (uchar *)ARR_DATA_PTR(result)-(uchar *)result);
POSTGIS_DEBUGF(3, " next element @ %p", (uchar *)result+oldsize);