Rename app_init to android_init

This commit is contained in:
iris committed 2026-09-11 12:36:50 -04:00
1 parent c3122301b4
commit 40e7259d99
11 files changed
+15 -15

No files matched your search

+4 -4
View File
@@ -19,11 +19,11 @@ use syn::{
/// JNI glue is Android-gated; the annotated function therefore does not need
/// its own `cfg` attribute.
#[proc_macro_attribute]
pub fn app_init(args: TokenStream, item: TokenStream) -> TokenStream {
pub fn android_init(args: TokenStream, item: TokenStream) -> TokenStream {
if !args.is_empty() {
return Error::new(
proc_macro2::Span::call_site(),
"app_init takes no arguments",
"android_init takes no arguments",
)
.into_compile_error()
.into();
@@ -44,7 +44,7 @@ pub fn app_init(args: TokenStream, item: TokenStream) -> TokenStream {
{
return Error::new(
function.sig.inputs.span(),
"an app_init function takes UI state and resources",
"an android_init function takes UI state and resources",
)
.into_compile_error()
.into();
@@ -56,7 +56,7 @@ pub fn app_init(args: TokenStream, item: TokenStream) -> TokenStream {
{
return Error::new(
function.sig.span(),
"an app_init function must be a plain, non-generic synchronous function",
"an android_init function must be a plain, non-generic synchronous function",
)
.into_compile_error()
.into();