Skip to content

Commit 81c8813

Browse files
authored
[libc++] Use the __strtoNUM functions from __locale instead of the old API (#118029)
The commit where I switched from using the old locale base API to the new functions defined inside the __locale namespace forgot to update references to the strtoNUM functions. This patch fixes that.
1 parent 056153f commit 81c8813

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcxx/include/locale

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end, ios_base::iostat
722722
__libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
723723
errno = 0;
724724
char* __p2;
725-
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
725+
long long __ll = __locale::__strtoll(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
726726
__libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
727727
if (__current_errno == 0)
728728
errno = __save_errno;
@@ -754,7 +754,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end, ios_base::iost
754754
__libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
755755
errno = 0;
756756
char* __p2;
757-
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
757+
unsigned long long __ll = __locale::__strtoull(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
758758
__libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
759759
if (__current_errno == 0)
760760
errno = __save_errno;
@@ -779,17 +779,17 @@ _LIBCPP_HIDE_FROM_ABI _Tp __do_strtod(const char* __a, char** __p2);
779779

780780
template <>
781781
inline _LIBCPP_HIDE_FROM_ABI float __do_strtod<float>(const char* __a, char** __p2) {
782-
return strtof_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
782+
return __locale::__strtof(__a, __p2, _LIBCPP_GET_C_LOCALE);
783783
}
784784

785785
template <>
786786
inline _LIBCPP_HIDE_FROM_ABI double __do_strtod<double>(const char* __a, char** __p2) {
787-
return strtod_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
787+
return __locale::__strtod(__a, __p2, _LIBCPP_GET_C_LOCALE);
788788
}
789789

790790
template <>
791791
inline _LIBCPP_HIDE_FROM_ABI long double __do_strtod<long double>(const char* __a, char** __p2) {
792-
return strtold_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
792+
return __locale::__strtold(__a, __p2, _LIBCPP_GET_C_LOCALE);
793793
}
794794

795795
template <class _Tp>

0 commit comments

Comments
 (0)