mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-22 04:40:01 +00:00
deps: upgrade ICU to 72-1 (#1160)
ICU was upgraded to the version specified in V8's `DEPS` file as of V8 11.0.226.2.
This commit is contained in:
parent
42dd5390ca
commit
8548b39833
@ -3210,8 +3210,8 @@ void v8__CompiledWasmModule__DELETE(v8::CompiledWasmModule* self) {
|
||||
extern "C" {
|
||||
|
||||
size_t icu_get_default_locale(char* output, size_t output_len) {
|
||||
const icu_71::Locale& default_locale = icu::Locale::getDefault();
|
||||
icu_71::CheckedArrayByteSink sink(output, static_cast<uint32_t>(output_len));
|
||||
const icu_72::Locale& default_locale = icu::Locale::getDefault();
|
||||
icu_72::CheckedArrayByteSink sink(output, static_cast<uint32_t>(output_len));
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
default_locale.toLanguageTag(sink, status);
|
||||
assert(status == U_ZERO_ERROR);
|
||||
|
@ -5,7 +5,7 @@ use std::ffi::CString;
|
||||
extern "C" {
|
||||
fn icu_get_default_locale(output: *mut char, output_len: usize) -> usize;
|
||||
fn icu_set_default_locale(locale: *const char);
|
||||
fn udata_setCommonData_71(this: *const u8, error_code: *mut i32);
|
||||
fn udata_setCommonData_72(this: *const u8, error_code: *mut i32);
|
||||
}
|
||||
|
||||
/// This function bypasses the normal ICU data loading process and allows you to force ICU's system
|
||||
@ -42,10 +42,10 @@ extern "C" {
|
||||
/// functionality for application data.
|
||||
// TODO(ry) Map error code to something useful.
|
||||
#[inline(always)]
|
||||
pub fn set_common_data_71(data: &'static [u8]) -> Result<(), i32> {
|
||||
pub fn set_common_data_72(data: &'static [u8]) -> Result<(), i32> {
|
||||
let mut error_code = 0i32;
|
||||
unsafe {
|
||||
udata_setCommonData_71(data.as_ptr(), &mut error_code);
|
||||
udata_setCommonData_72(data.as_ptr(), &mut error_code);
|
||||
}
|
||||
if error_code == 0 {
|
||||
Ok(())
|
||||
|
@ -31,7 +31,7 @@ impl Drop for SetupGuard {
|
||||
fn setup() -> SetupGuard {
|
||||
static START: std::sync::Once = std::sync::Once::new();
|
||||
START.call_once(|| {
|
||||
assert!(v8::icu::set_common_data_71(align_data::include_aligned!(
|
||||
assert!(v8::icu::set_common_data_72(align_data::include_aligned!(
|
||||
align_data::Align16,
|
||||
"../third_party/icu/common/icudtl.dat"
|
||||
))
|
||||
@ -6790,7 +6790,7 @@ fn icu_date() {
|
||||
|
||||
#[test]
|
||||
fn icu_set_common_data_fail() {
|
||||
assert!(v8::icu::set_common_data_71(&[1, 2, 3]).is_err());
|
||||
assert!(v8::icu::set_common_data_72(&[1, 2, 3]).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
2
third_party/icu
vendored
2
third_party/icu
vendored
@ -1 +1 @@
|
||||
Subproject commit 9673defd90d4c5f2dbf3ebdd9f62525c57fe5a9c
|
||||
Subproject commit 629a4bb99bf9f088120a2435deb6f630fc30f351
|
Loading…
Reference in New Issue
Block a user