Hi all,
> +/**
> + * Structure for efficiently tracking a buffer that could contain
> + * a zero terminated string, or a fixed length non zero string.
> + */
> +typedef struct
> +{
> + /** pointer to the data, which could be a string or a memory block. */
> + union {
> + char *str;
> + void *mem;
> + } d;
> +
> + /** size of the data. If positive, the data is of fixed size. If
> + * negative, the data is zero terminated and the absolute value
> + * represents the data length including terminating zero.
> + *
> + * we use apr_int64_t to make it simple to detect overflow.
> + */
> + apr_int64_t size;
> +
> +} apr_buffer_t;
I need some advice on handling Windows 32 bit. apr_int64_t for size is too big,
and tests are failing.
Technically apr_ssize_t is the right size, but the definition of ssize_t is
[-1, SSIZE_MAX]. I need a signed very big number. Given we define apr_ssize_t,
is it ok to use apr_ssize_t anyway?
This is purely an internal detail, outside you just see apr_size_t only
(limited to half the size).
Regards,
Graham
--