Sujet : Re: C and C++, promotion, stabilization, migration (was: Re: New VSI post on Youtube)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.vmsDate : 20. Aug 2024, 00:33:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va0koq$32fon$1@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.159 (Vovchansk; )
On Mon, 19 Aug 2024 16:05:59 -0400, Stephen Hoffman wrote:
strings and character encoding are more "fun":
If a system/library call is going to return a dynamic amount of data, it
is good if it can give some indication of how much data it is going to
return first.
The best calls are the ones that, if you pass NULL for the buffer, they
will return the number of bytes they would have put in the buffer. So you
allocate that size of buffer and do a second call, and get back the actual
buffer data.
I did a Python wrapper for Fribidi, and unfortunately its text-encoding
conversion calls didn’t work that way. But then, they probably
couldn’t ...