Inline BPF log functions (#6007)

This commit is contained in:
Jack May 2019-09-20 15:40:41 -07:00 committed by GitHub
parent 33e2af341a
commit 5486e4c364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ macro_rules! info {
///
/// @param message - Message to print
#[cfg(feature = "program")]
#[inline]
pub fn sol_log(message: &str) {
unsafe {
sol_log_(message.as_ptr(), message.len() as u64);
@ -45,6 +46,7 @@ pub fn sol_log(_message: &str) {}
/// @param argx - integer arguments to print
#[cfg(feature = "program")]
#[inline]
pub fn sol_log_64(arg1: u64, arg2: u64, arg3: u64, arg4: u64, arg5: u64) {
unsafe {
sol_log_64_(arg1, arg2, arg3, arg4, arg5);