mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-22 06:09:47 -05:00
Upgrade to ICU 70 (#919)
This commit is contained in:
parent
15bf751387
commit
184467a9cc
3 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn udata_setCommonData_69(this: *const u8, error_code: *mut i32);
|
fn udata_setCommonData_70(this: *const u8, error_code: *mut i32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function bypasses the normal ICU data loading process and allows you to force ICU's system
|
/// This function bypasses the normal ICU data loading process and allows you to force ICU's system
|
||||||
|
@ -35,10 +35,10 @@ extern "C" {
|
||||||
/// This function has no effect on application (non ICU) data. See udata_setAppData() for similar
|
/// This function has no effect on application (non ICU) data. See udata_setAppData() for similar
|
||||||
/// functionality for application data.
|
/// functionality for application data.
|
||||||
// TODO(ry) Map error code to something useful.
|
// TODO(ry) Map error code to something useful.
|
||||||
pub fn set_common_data_69(data: &'static [u8]) -> Result<(), i32> {
|
pub fn set_common_data_70(data: &'static [u8]) -> Result<(), i32> {
|
||||||
let mut error_code = 0i32;
|
let mut error_code = 0i32;
|
||||||
unsafe {
|
unsafe {
|
||||||
udata_setCommonData_69(data.as_ptr(), &mut error_code);
|
udata_setCommonData_70(data.as_ptr(), &mut error_code);
|
||||||
}
|
}
|
||||||
if error_code == 0 {
|
if error_code == 0 {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Drop for SetupGuard {
|
||||||
fn setup() -> SetupGuard {
|
fn setup() -> SetupGuard {
|
||||||
static START: std::sync::Once = std::sync::Once::new();
|
static START: std::sync::Once = std::sync::Once::new();
|
||||||
START.call_once(|| {
|
START.call_once(|| {
|
||||||
assert!(v8::icu::set_common_data_69(align_data::include_aligned!(
|
assert!(v8::icu::set_common_data_70(align_data::include_aligned!(
|
||||||
align_data::Align16,
|
align_data::Align16,
|
||||||
"../third_party/icu/common/icudtl.dat"
|
"../third_party/icu/common/icudtl.dat"
|
||||||
))
|
))
|
||||||
|
@ -5432,7 +5432,7 @@ fn icu_date() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn icu_set_common_data_fail() {
|
fn icu_set_common_data_fail() {
|
||||||
assert!(v8::icu::set_common_data_69(&[1, 2, 3]).is_err());
|
assert!(v8::icu::set_common_data_70(&[1, 2, 3]).is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
2
third_party/icu
vendored
2
third_party/icu
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit f022e298b4f4a782486bb6d5ce6589c998b51fe2
|
Subproject commit 2cec8175b83f6145398d30d85a97da283c1a2242
|
Loading…
Add table
Reference in a new issue