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.

> If the second, could the parameter type be changed from a string to char, and
> the array handling would be applied to strings the same way as for all other
> array types – except that the terminating NUL is also counted as one element.
> I think this could be done in an ABI-compatible way.

brlapi__getParameterAlloc already adds a NUL after the `count` chars.

Samuel
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to