[BRLTTY] Low-level BrlAPI questions

Aura Kelloniemi kaura.dev at sange.fi
Tue May 11 11:18:56 EDT 2021


Hi

On 2021-05-11 at 09:57 +0200, Samuel Thibault <samuel.thibault at ens-lyon.org> wrote:
 > Aura Kelloniemi, le mar. 11 mai 2021 10:01:35 +0300, a ecrit:
 > > How are strings handled in the parameters API?
 > > 
 > > My initial thought was that string parameter values (as returned by BrlAPI)
 > > are const char* so that this pointer is contained into the parameter value.
 > > This would allow having a parameter that is an array of strings.

 > We don't use \0 over the wires, so we don't have arrays of strings, you
 > request for the different strings.

I don't care about hte NUL so much – it is just convenience for C programmers,
but other languages don't generally use it.

Anyways, I was asking whether the string value is directly contained in the
parameter (i.e. the parameter value is an array of characters) or is there one
more pointer indirection. Dave answered this question, and there is no
additional indirection.

Now my question is: why is .count set to 0 and .isArray to false for string
parameterss, even though strings are arrays of characters. Shouldn't arrays of
char and int get the same handling?

-- 
Aura


More information about the BRLTTY mailing list