mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
Release independent packages
- napi@3.0.0-alpha.19
This commit is contained in:
parent
fd23549009
commit
59dce18ab4
@ -8,7 +8,7 @@ name = "napi"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/napi-rs/napi-rs"
|
||||
rust-version = "1.80"
|
||||
version = "3.0.0-alpha.18"
|
||||
version = "3.0.0-alpha.19"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
@ -52,7 +52,10 @@ macro_rules! impl_typed_array {
|
||||
finalizer_notify: *mut dyn FnOnce(*mut $rust_type, usize),
|
||||
}
|
||||
|
||||
/// SAFETY: This is undefined behavior, as the JS side may always modify the underlying buffer,
|
||||
/// without synchronization. Also see the docs for the `DerfMut` impl.
|
||||
unsafe impl Send for $name {}
|
||||
unsafe impl Sync for $name {}
|
||||
|
||||
impl Finalizer for $name {
|
||||
type RustType = $rust_type;
|
||||
@ -259,6 +262,9 @@ macro_rules! impl_typed_array {
|
||||
}
|
||||
}
|
||||
|
||||
/// SAFETY: This is literally undefined behavior. `Buffer::clone` allows you to create shared
|
||||
/// access to the underlying data, but `as_mut` and `deref_mut` allow unsynchronized mutation of
|
||||
/// that data (not to speak of the JS side having write access as well, at the same time).
|
||||
impl DerefMut for $name {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
self.as_mut()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user