From 1b920a7c2f8df62dde877fff6d4cd13bc95395de Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Thu, 13 Oct 2022 21:42:43 +0100 Subject: [PATCH] agb::entry should result in extern "C" --- agb-macros/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agb-macros/src/lib.rs b/agb-macros/src/lib.rs index 87dcaf6b..a0f5f7c1 100644 --- a/agb-macros/src/lib.rs +++ b/agb-macros/src/lib.rs @@ -79,7 +79,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream { #[cfg(not(test))] #[export_name = "main"] #(#attrs)* - pub fn #fn_name() -> ! { + pub extern "C" fn #fn_name() -> ! { let #mutable #argument_name = unsafe { #argument_type ::new_in_entry() }; #(#stmts)* @@ -88,7 +88,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream { #[cfg(test)] #[export_name = "main"] #(#attrs)* - pub fn #fn_name() -> ! { + pub extern "C" fn #fn_name() -> ! { let mut #argument_name = unsafe { #argument_type ::new_in_entry() }; if cfg!(test) {