diff --git a/agb/examples/allocation.rs b/agb/examples/allocation.rs index a9e9b80d..b1b9a8b8 100644 --- a/agb/examples/allocation.rs +++ b/agb/examples/allocation.rs @@ -9,9 +9,9 @@ use alloc::boxed::Box; #[agb::entry] fn main(_gba: agb::Gba) -> ! { loop { - let a = Box::new_in(1, agb::agb_alloc::EWRAM_ALLOC); + let a = Box::new_in(1, agb::EWRAM_ALLOC); let b = Box::new(1); - let c = Box::new_in(3, agb::agb_alloc::IWRAM_ALLOC); + let c = Box::new_in(3, agb::IWRAM_ALLOC); agb::println!("ewram allocation made to {:?}", &*a as *const _); agb::println!("global allocation made to {:?}", &*b as *const _); agb::println!("iwram allocation made to {:?}", &*c as *const _); diff --git a/agb/src/lib.rs b/agb/src/lib.rs index 7b6448c5..31657fd9 100644 --- a/agb/src/lib.rs +++ b/agb/src/lib.rs @@ -162,7 +162,7 @@ pub use agb_macros::entry; pub use agb_sound_converter::include_wav; extern crate alloc; -pub mod agb_alloc; +mod agb_alloc; mod agbabi; mod bitarray; @@ -190,6 +190,8 @@ pub mod syscall; /// Interactions with the internal timers pub mod timer; +pub use {agb_alloc::EWRAM_ALLOC, agb_alloc::IWRAM_ALLOC}; + #[cfg(not(any(test, feature = "testing")))] #[panic_handler] #[allow(unused_must_use)]