make secure_join flow more readable by using and adding a few macros, tiny api changes

This commit is contained in:
holger krekel
2019-09-05 03:27:55 +02:00
parent 4bbab876ae
commit 9f09c73ec1
4 changed files with 150 additions and 229 deletions

View File

@@ -57,3 +57,10 @@ macro_rules! log_event {
formatted_c.as_ptr() as libc::uintptr_t);
}};
}
#[macro_export]
macro_rules! emit_event {
($ctx:expr, $event:expr, $data1:expr, $data2:expr) => {
$ctx.call_cb($event, $data1 as libc::uintptr_t, $data2 as libc::uintptr_t);
};
}