Re: svn commit: r1917082 - /apr/apr/trunk/buffer/apr_buffer.c

"Graham Leggett via dev" <[email protected]>
Newsgroups gmane.comp.apache.apr.devel
Message-ID <[email protected]>
On 18 Apr 2024, at 17:07, Yann Ylavic <[email protected]> wrote:

> If so maybe:
> 
> typedef struct
> {
>    union {
>        char *str;
>        void *mem;
>    } d;
> #if APR_SIZEOF_VOIDP == 8
> #   define APR_BUFFER_SIZE_WIDTH 63
> #else
> #   define APR_BUFFER_SIZE_WIDTH 31
> #endif
>   apr_size_t size:APR_BUFFER_SIZE_WIDTH,
>               zero_terminated:1;
> } apr_buffer_t;
> 
> One could still use buf->size directly.

This is way simpler, thank you - I have made it so.

http://svn.apache.org/viewvc?view=revision&revision=1917266

Regards,
Graham
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.