Bug 88830 - Add object name parsing to pa_config_parser
Summary: Add object name parsing to pa_config_parser
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
Keywords: love
Depends on:
Reported: 2015-01-27 17:42 UTC by Tanu Kaskinen
Modified: 2018-07-30 09:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Tanu Kaskinen 2015-01-27 17:42:42 UTC
Some configuration files support the following pattern:

    [SomeObjectType foo]
    somekey = somevalue

    [SomeObjectType bar]
    somekey = someothervalue

In the above example, "SomeObjectType" identifies a type for an object, and "foo" and "bar" identify the object. Currently pa_config_parser doesn't understand anything about this, however; it just sees that there are two section with names "SomeObjectType foo" and "SomeObjectType bar". This means that parsing the object names is pushed to the code that is using pa_config_parser. The object names are parsed every time a config value assignment is done, which is redundant work, and makes the parsing more complicated, and it also prevents us from printing the line number of the section header when a missing or invalid object name is encountered.

So, pa_config_parser should be extended so that it natively understands the concept of object names in section headers, so that the users of pa_config_parser can easily fetch the object name without having to parse it themselves.
Comment 1 GitLab Migration User 2018-07-30 09:34:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/23.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.