On Thu, 31 Jan 2002, Paul Davis wrote:

> >> in addition, i've already reported a bug in the config parsing whereby
> >> if something could be a string or an integer, and the string contains
> >> an integer value, it assumes the item was an integer.
> >
> >It depends on the code which uses a configuration node what information it
> >expects. It's not a problem to request an ascii representation of value if
> >it's useable.
>
> precisely. this is backwards. if you say:
>
>          card 9652

The value assigned to key "card" has integer type in the case.

> and
>          card "9652"

The value assigned to key "card" has string type in the case.

>
> its completely unclear what is meant by each statement.
>
> in a real parser, the argument would be tagged with a type code, so
> that the handler for "card" could check what kind of argument was
> given.
>
> but instead, it asks for an integer, and since the value is "usable",
> it gets it. you've allowed the handler for "card" to determine the
> priority of integer over string arguments, which is backwards: the
> handlers for each keyword should inquire what type was used, and go on
> from there.

We check the type of value in the single configuration parsers (which is
different from the ascii load/save code). I don't see the problem you
described.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
SuSE Linux    http://www.suse.com
ALSA Project  http://www.alsa-project.org


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to