Skip to content

Commit

Permalink
fix(android): fix android_binding macro expantion
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Oct 29, 2024
1 parent 67e44e4 commit 4b7523f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-android-binding-macro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": "patch"
---

Fix `android_binding` macro incorrect expansion.
3 changes: 2 additions & 1 deletion src/platform_impl/android/ndk_glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ macro_rules! android_binding {
::tao::android_binding!($domain, $package, $activity, $setup, $main, ::tao)
};
($domain:ident, $package:ident, $activity:ident, $setup:path, $main:ident, $tao:path) => {{
use $tao::platform::android::prelude::{android_fn, *};
// NOTE: be careful when changing how this use statement is written
use $tao::{platform::android::prelude::android_fn, platform::android::prelude::*};
fn _____tao_store_package_name__() {
PACKAGE.get_or_init(move || generate_package_name!($domain, $package));
}
Expand Down

0 comments on commit 4b7523f

Please sign in to comment.