From 9a3e4fffb687fa9a6b6e13923c155ae0920f256c Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Mon, 1 Jul 2024 15:55:30 -0600 Subject: [PATCH] Remove deprecated entrypoint definitions --- sdk/src/entrypoint.rs | 27 --------------------------- sdk/src/entrypoint_deprecated.rs | 20 -------------------- 2 files changed, 47 deletions(-) diff --git a/sdk/src/entrypoint.rs b/sdk/src/entrypoint.rs index e83bdf0575b1f0..38c85e00af958a 100644 --- a/sdk/src/entrypoint.rs +++ b/sdk/src/entrypoint.rs @@ -5,30 +5,3 @@ //! [`bpf_loader`]: crate::bpf_loader pub use solana_program::entrypoint::*; - -#[macro_export] -#[deprecated( - since = "1.4.3", - note = "use solana_program::entrypoint::entrypoint instead" -)] -macro_rules! entrypoint { - ($process_instruction:ident) => { - #[cfg(all(not(feature = "custom-heap"), not(test)))] - #[global_allocator] - static A: $crate::entrypoint::BumpAllocator = $crate::entrypoint::BumpAllocator { - start: $crate::entrypoint::HEAP_START_ADDRESS, - len: $crate::entrypoint::HEAP_LENGTH, - }; - - /// # Safety - #[no_mangle] - pub unsafe extern "C" fn entrypoint(input: *mut u8) -> u64 { - let (program_id, accounts, instruction_data) = - unsafe { $crate::entrypoint::deserialize(input) }; - match $process_instruction(&program_id, &accounts, &instruction_data) { - Ok(()) => $crate::entrypoint::SUCCESS, - Err(error) => error.into(), - } - } - }; -} diff --git a/sdk/src/entrypoint_deprecated.rs b/sdk/src/entrypoint_deprecated.rs index c75b9c47a57a49..443a9bc0893f12 100644 --- a/sdk/src/entrypoint_deprecated.rs +++ b/sdk/src/entrypoint_deprecated.rs @@ -8,23 +8,3 @@ //! [`bpf_loader_deprecated`]: crate::bpf_loader_deprecated pub use solana_program::entrypoint_deprecated::*; - -#[macro_export] -#[deprecated( - since = "1.4.3", - note = "use solana_program::entrypoint::entrypoint instead" -)] -macro_rules! entrypoint_deprecated { - ($process_instruction:ident) => { - /// # Safety - #[no_mangle] - pub unsafe extern "C" fn entrypoint(input: *mut u8) -> u64 { - let (program_id, accounts, instruction_data) = - unsafe { $crate::entrypoint_deprecated::deserialize(input) }; - match $process_instruction(&program_id, &accounts, &instruction_data) { - Ok(()) => $crate::entrypoint_deprecated::SUCCESS, - Err(error) => error.into(), - } - } - }; -}