[Ardour-Dev] Feedback on string-convert branch

Tim Mayberry mojofunk at gmail.com
Wed Jan 4 15:12:33 PST 2017


On Thu, Jan 5, 2017 at 7:14 AM, Paul Davis <paul at linuxaudiosystems.com>
wrote:

>
>
> On Wed, Jan 4, 2017 at 12:52 PM, Tim Mayberry <mojofunk at gmail.com> wrote:
>
>> I've pushed a branch called string-convert to the main repository that
>> I'd like
>> some feedback on from the other developers when they get a chance. It
>> represents a fair bit of work over the last year or so and is attempt to
>> make
>> improvements to the de/serialization code in Ardour.
>>
>
> I still don't understand how this is supposed to work with plugin data. If
> you leave the global locale setting untouched, how do we know what to do
> when reloading plugin data across two systems where the global locale may
> be different?
>
>

Of the 100 or so LocaleGuard's in master, the 10 or so that remain are in
the Plugin get/set_state methods, which is why I mentioned removing
LocaleGuard's that guard internal string conversion.

That some plugins depend on a specific global locale for correct operation
or worse modify the global locale is dissappointing but seems to be a
reality and it is accounted for in the branch.

There will be some further small changes necessary to account for the
recent LocaleMode changes to work correctly if the global C++ locale is
used for localization of numeric data via
string_compose/iostream/stringstring. In master AFAICT the LocaleMode
setting won't currently work correctly for C++ level numeric conversion
because as I mentioned, the PBD::LocaleGuard constructor sets the global
C++ locale to "C" and then only the global C locale is reset in the
LocaleGuard destructor, which means that the global C++ locale is always
"C" for the purposes of numeric conversion and there are a fair few places
in master (that don't use a LocaleGuard) that make this assumption or at
least rely on it for correct behaviour.

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ardour.org/pipermail/ardour-dev-ardour.org/attachments/20170105/846ce333/attachment.htm>


More information about the Ardour-Dev mailing list