-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fn generate_grain_{y,uv}_rust
: Make safe (#1128)
This makes the `fn generate_grain_{y,uv}_rust` fallbacks safe, and then marks all callers safe where possible. * Fixes #856. * Fixes #858. Note that for `mod fg_apply` (#856), it is made `#![deny(unsafe_code)]`. However, for `mod filmgrain` (#858), I didn't add a module-wide `#![deny(unsafe_op_in_unsafe_fn)]`, as I left the `unsafe fn *_neon` asm wrappers, as it's mostly just delegating to the asm `fn`s. The other few `ptr::add`s are done safely in the fallbacks, so adding `// SAFETY` comments here seems redundant. The other `unsafe fn *_c_erased` ones are individually marked `#[deny(unsafe_op_in_unsafe_fn)]`, as it makes sense for them.
- Loading branch information
Showing
4 changed files
with
51 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters