2020-10-23 17:22:10 -07:00
|
|
|
pub use solana_program::entrypoint_deprecated::*;
|
2020-08-31 14:06:58 -07:00
|
|
|
|
|
|
|
#[macro_export]
|
2020-10-19 13:19:24 -07:00
|
|
|
#[deprecated(
|
|
|
|
since = "1.4.3",
|
2020-10-23 17:22:10 -07:00
|
|
|
note = "use solana_program::entrypoint::entrypoint instead"
|
2020-10-19 13:19:24 -07:00
|
|
|
)]
|
2020-08-31 14:06:58 -07:00
|
|
|
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(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|