Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7f39f576
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7f39f576
编写于
11月 13, 2017
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Implement strtod_l() on MSVC
Patch from Jean Ghali on mailing list.
上级
e5d70988
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
6 deletion
+15
-6
src/hb-common.cc
src/hb-common.cc
+15
-6
未找到文件。
src/hb-common.cc
浏览文件 @
7f39f576
...
@@ -699,34 +699,43 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv)
...
@@ -699,34 +699,43 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv)
#if defined (HAVE_NEWLOCALE) && defined (HAVE_STRTOD_L)
#if defined (HAVE_NEWLOCALE) && defined (HAVE_STRTOD_L)
#define USE_XLOCALE 1
#define USE_XLOCALE 1
#define HB_LOCALE_T locale_t
#define HB_CREATE_LOCALE(locName) newlocale (LC_ALL_MASK, locName, nullptr)
#define HB_FREE_LOCALE(loc) freelocale (loc)
#elif defined(_MSC_VER)
#define USE_XLOCALE 1
#define HB_LOCALE_T _locale_t
#define HB_CREATE_LOCALE(locName) _create_locale (LC_ALL, locName)
#define HB_FREE_LOCALE(loc) _free_locale (loc)
#define strtod_l(a, b, c) _strtod_l ((a), (b), (c))
#endif
#endif
#ifdef USE_XLOCALE
#ifdef USE_XLOCALE
static
locale_t
C_locale
;
static
HB_LOCALE_T
C_locale
;
#ifdef HB_USE_ATEXIT
#ifdef HB_USE_ATEXIT
static
void
static
void
free_C_locale
(
void
)
free_C_locale
(
void
)
{
{
if
(
C_locale
)
if
(
C_locale
)
freelocale
(
C_locale
);
HB_FREE_LOCALE
(
C_locale
);
}
}
#endif
#endif
static
locale_t
static
HB_LOCALE_T
get_C_locale
(
void
)
get_C_locale
(
void
)
{
{
retry:
retry:
locale_t
C
=
(
locale_t
)
hb_atomic_ptr_get
(
&
C_locale
);
HB_LOCALE_T
C
=
(
HB_LOCALE_T
)
hb_atomic_ptr_get
(
&
C_locale
);
if
(
unlikely
(
!
C
))
if
(
unlikely
(
!
C
))
{
{
C
=
newlocale
(
LC_ALL_MASK
,
"C"
,
nullptr
);
C
=
HB_CREATE_LOCALE
(
"C"
);
if
(
!
hb_atomic_ptr_cmpexch
(
&
C_locale
,
nullptr
,
C
))
if
(
!
hb_atomic_ptr_cmpexch
(
&
C_locale
,
nullptr
,
C
))
{
{
freelocale
(
C_locale
);
HB_FREE_LOCALE
(
C_locale
);
goto
retry
;
goto
retry
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录