mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
Merge pull request #333 from gwilymk/make-the-entry-macro-extern-c
agb::entry should result in extern "C"
This commit is contained in:
commit
1741359550
|
@ -79,7 +79,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[export_name = "main"]
|
#[export_name = "main"]
|
||||||
#(#attrs)*
|
#(#attrs)*
|
||||||
pub fn #fn_name() -> ! {
|
pub extern "C" fn #fn_name() -> ! {
|
||||||
let #mutable #argument_name = unsafe { #argument_type ::new_in_entry() };
|
let #mutable #argument_name = unsafe { #argument_type ::new_in_entry() };
|
||||||
|
|
||||||
#(#stmts)*
|
#(#stmts)*
|
||||||
|
@ -88,7 +88,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[export_name = "main"]
|
#[export_name = "main"]
|
||||||
#(#attrs)*
|
#(#attrs)*
|
||||||
pub fn #fn_name() -> ! {
|
pub extern "C" fn #fn_name() -> ! {
|
||||||
let mut #argument_name = unsafe { #argument_type ::new_in_entry() };
|
let mut #argument_name = unsafe { #argument_type ::new_in_entry() };
|
||||||
|
|
||||||
if cfg!(test) {
|
if cfg!(test) {
|
||||||
|
|
Loading…
Reference in a new issue