@@ -44,13 +44,30 @@ use crate::{conf, HandshakeState, ShutdownResult};
4444/// versioning happening there,
4545/// - the name should appear in the list of all entry points there.
4646macro_rules! entry {
47- ( pub fn $name: ident( $( $args : tt ) * ) $body: block) => {
47+ ( pub fn $name: ident( $( $aname : ident : $aty : ty ) , * $ ( , ) ? ) $body: block) => {
4848 #[ no_mangle]
49- pub extern "C" fn $name( $( $args) * ) { ffi_panic_boundary! { $body } }
49+ pub extern "C" fn $name( $( $aname: $aty) ,* ) {
50+ ffi_panic_boundary! {
51+ #[ cfg( debug_assertions) ]
52+ log:: trace!( "-> {}{:?}" , & stringify!( $name) [ 1 ..] , & ( $( $aname, ) * ) ) ;
53+ $body
54+ #[ cfg( debug_assertions) ]
55+ log:: trace!( "<- {}" , & stringify!( $name) [ 1 ..] ) ;
56+ }
57+ }
5058 } ;
51- ( pub fn $name: ident( $( $args : tt ) * ) -> $ret: ty $body: block) => {
59+ ( pub fn $name: ident( $( $aname : ident : $aty : ty ) , * $ ( , ) ? ) -> $ret: ty $body: block) => {
5260 #[ no_mangle]
53- pub extern "C" fn $name( $( $args) * ) -> $ret { ffi_panic_boundary! { $body } }
61+ pub extern "C" fn $name( $( $aname: $aty) ,* ) -> $ret {
62+ ffi_panic_boundary! {
63+ #[ cfg( debug_assertions) ]
64+ log:: trace!( "-> {}{:?}" , & stringify!( $name) [ 1 ..] , & ( $( $aname, ) * ) ) ;
65+ let r = $body;
66+ #[ cfg( debug_assertions) ]
67+ log:: trace!( "<- {} [{:?}]" , & stringify!( $name) [ 1 ..] , r) ;
68+ r
69+ }
70+ }
5471 } ;
5572}
5673
0 commit comments