Skip to content

Commit

Permalink
Limit scope of unsafe code
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisaphone committed Mar 14, 2020
1 parent 5466d9b commit da4e246
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/aether/src/darksiders1/code/vigil/gfc/base/reflection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ struct_wrapper_super!(Class, gfc::IRefObject);

impl Class {
pub fn new_instance(&self) -> gfc::AutoRef<gfc::Object> {
unsafe {
let obj = init_with(|p| {
let obj = unsafe {
init_with(|p| {
self.inner.newInstance(p);
});
obj.lift()
}
})
};
obj.lift()
}

pub fn name(&self) -> &gfc::HString {
Expand Down

0 comments on commit da4e246

Please sign in to comment.