Skip to content

Commit

Permalink
byeah
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Sep 8, 2024
1 parent b2084be commit da5f552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions auxtools-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,9 @@ pub fn hook(attr: TokenStream, item: TokenStream) -> TokenStream {
if let syn::Pat::Ident(p) = &*arg.pat {
arg_names.push(p.ident.clone());
let index = arg_names.len() - 1;
proc_arg_unpacker.push(
(quote! {
&args[#index]
})
.into()
);
proc_arg_unpacker.push(quote! {
&args[#index]
});
}
}
let _default_null = quote! {
Expand Down
2 changes: 1 addition & 1 deletion auxtools/src/string_intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ macro_rules! byond_string {
($s:literal) => {
unsafe {
static mut STORE: $crate::InternedString = $crate::InternedString($s, std::cell::UnsafeCell::new(None));
$crate::inventory::submit!(unsafe { &STORE });
$crate::inventory::submit!(unsafe { &*::std::ptr::addr_of!(STORE) });
let x = &*STORE.1.get();
x.as_ref().unwrap()
}
Expand Down

0 comments on commit da5f552

Please sign in to comment.