[BRLTTY] Low-level BrlAPI questions
Samuel Thibault
samuel.thibault at ens-lyon.org
Thu May 6 18:29:01 EDT 2021
Aura Kelloniemi, le jeu. 06 mai 2021 16:10:51 +0300, a ecrit:
> On 2021-03-26 at 22:45 +0200, Aura Kelloniemi <kaura.dev at sange.fi> wrote:
> > I have several questions about BrlAPI's internals:
>
> Now I'm working with the parameters. In order to take advantage of Rust's
> strong static type system I consider adding separate functions form
> getting/setting/watching for each parameter. This code generation can be
> automated with macros, so it will be less work than what it sounds.
>
> I hae some questions about the parameter system:
>
> - Parameter properties don't provide the read-only status information of a
> parameter. Could this be added?
Ah yes we could do that.
> (Yes, aI know it breaks ABI.)
Adding a field to a read-only structure does not pose problem, it's
backward-compatible.
> - brlapi_param_properties_t defines the parameter properties for all
> parameters. When type of a parameter is BRLAPI_PARAM_TYPE_STRING, the count
> member is not initialized (and thus will be zero). Shouldn't count be set
> to 1, if the parameter has a single value – like one string?
Dave, what do you think?
I don't really mind either way.
> - Is the isArray member in brlapi_param_properties_t somehow useful in
> parameter properties. If count is greater than 1, doesn't it mean that the
> parameter value is an array – or are there varaible-length arrays, and if
> so, how are they represented in properties?
I don't know what Dave intended.
Samuel
More information about the BRLTTY
mailing list