0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2025-01-19 04:16:07 -05:00
denoland-rusty-v8/src/name.rs

17 lines
454 B
Rust

// Copyright 2019-2020 the Deno authors. All rights reserved. MIT license.
use crate::support::int;
use crate::Name;
extern "C" {
fn v8__Name__GetIdentityHash(this: *const Name) -> int;
}
impl Name {
/// The `String` or `Symbol` specific equivalent of `Data::get_hash()`.
/// This function is kept around for testing purposes only.
#[doc(hidden)]
pub fn get_identity_hash(&self) -> int {
unsafe { v8__Name__GetIdentityHash(self) }
}
}