Re: [bug-libunistring] Avoiding heap allocations in ‘u32_conv_from_encoding’

2010-07-13 Thread Ludovic Courtès
Hi, >> Can you also comment on this: >> >> > BTW, it’s unclear to me from the manual whether RESULT_LEN above should >> > be the size in bytes or the size in uint32_t. > > It's documented in chapter 2 "Conventions" of the manual [1]. The *LENGTHP > value indicates the string length in units (i.e.

Re: [bug-libunistring] Avoiding heap allocations in ‘u32_conv_from_encoding’

2010-07-13 Thread Bruno Haible
Hi Ludo, > Can you also comment on this: > > > BTW, it’s unclear to me from the manual whether RESULT_LEN above should > > be the size in bytes or the size in uint32_t. It's documented in chapter 2 "Conventions" of the manual [1]. The *LENGTHP value indicates the string length in units (i.e. uin

Re: [bug-libunistring] Avoiding heap allocations in ‘u32_conv_from_encoding’

2010-07-13 Thread Ludovic Courtès
Hello Bruno! Bruno Haible writes: > Ludovic Courtès wrote in > : >> In the example below, conversion from UTF-8 to UCS-4 succeeds but >> ‘u32_conv_from_encoding’ allocates memory on the heap although the >> supplied buffer

Re: [bug-libunistring] Avoiding heap allocations in ‘u32_conv_from_encoding’

2010-07-13 Thread Bruno Haible
Hello Ludo, Ludovic Courtès wrote in : > In the example below, conversion from UTF-8 to UCS-4 succeeds but > ‘u32_conv_from_encoding’ allocates memory on the heap although the > supplied buffer appears to be large enough: I