Skip to content

Commit

Permalink
Remove deprecated entrypoint definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots committed Jul 1, 2024
1 parent 640d962 commit 9a3e4ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
27 changes: 0 additions & 27 deletions sdk/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
};
}
20 changes: 0 additions & 20 deletions sdk/src/entrypoint_deprecated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
};
}

0 comments on commit 9a3e4ff

Please sign in to comment.