mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-03-10 14:06:53 -04:00
18 lines
454 B
Rust
18 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) }
|
||
|
}
|
||
|
}
|