[PATCH v3 2/8] msvcrt: Share locale names between threadlocinfo instances.

Chip Davis cdavis at codeweavers.com
Mon Feb 3 16:29:47 CST 2020


February 3, 2020 10:40 AM, "Piotr Caban" <piotr.caban at gmail.com> wrote:

> Hi Chip,
> 
> On 2/2/20 11:55 PM, Chip Davis wrote:
> 
>> +/* INTERNAL: Copy lc_handle, lc_id, and lc_category from one threadlocinfo to another */
>> +static void copy_threadlocinfo_category(MSVCRT_pthreadlocinfo locinfo, MSVCRT_pthreadlocinfo
>> old_locinfo, int category)
>> +{
>> + locinfo->lc_handle[category] = old_locinfo->lc_handle[category];
>> + locinfo->lc_id[category] = old_locinfo->lc_id[category];
>> + if(!locinfo->lc_category[category].locale) {
> 
> Why are you checking locinfo->lc_category[category].locale here?

To avoid overwriting it and leaking it in case it was set by init_category_name() earlier. Also, if I don't do this, the msvcr110 tests fail.

> 
> Thanks,
> Piotr


Chip



More information about the wine-devel mailing list