← Back to team overview

kicad-developers team mailing list archive

Re: LOCALE_IO thread-local

 

Le 26/06/2019 à 15:16, Wayne Stambaugh a écrit :
> Hey Seth,
> 
> I just tested your patch on windows and I didn't notice any issues.
> Although given that my locale is en-US, I'm not sure about the
> completeness of my testing.  It might be useful for someone with a
> locale other the en-US to do some testing.
> 
> Cheers,
> 
> Wayne
> 
> On 6/21/2019 5:25 PM, Seth Hillbrand wrote:
>> Hi Devs-
>>
>> We currently have an RAII locale switch (LOCALE_IO) that swaps the
>> global locale to allow floating point handling with decimal points
>> instead of a commas.  Because it changes the global locale, we need to
>> be very careful about allowing the user interface to update during the
>> time that it is temporarily set.
>>
>> The attached patch moves the locale setting into a thread-local setting,
>> allowing us to use standard threading and UI updates.
>>
>> There are no functionality changes in this patch.  This is merely a
>> change in the calling structure that will allow future cleaning of the
>> LOCALE_IO distribution in the code.
>>
>> I'd greatly appreciate any windows testing.
>>
>> Thanks-
>> Seth

I just tested it on W7, with a fr-FR locale (comma as fp separator).
I made only a few tests, but I did not see any issue.


-- 
Jean-Pierre CHARRAS


References