Skip to main content

shim_sig_args_sep

Macro shim_sig_args_sep 

Source
macro_rules! shim_sig_args_sep {
    ($this:ident, [$($tt:tt)*]) => { ... };
    (@ $this:ident [$($final:tt)*] [$($collected:tt)*] , $($tt:tt)*) => { ... };
    (@ $this:ident [$($final:tt)*] [$($collected:tt)*] $first:tt $($tt:tt)*) => { ... };
    (@ $this:ident [$($final:tt)*] [$($collected:tt)+] ) => { ... };
    (@ $this:ident [$($final:tt)*] [] ) => { ... };
}
Expand description

Helper for shim_sig!.

Groups tokens into comma-separated chunks and calls the provided macro on them.

§Examples

shim_sig_args_sep!(this, [*const _, i32, libc::off64_t]);
// expands to:
[shim_sig_arg!(*const _), shim_sig_arg!(i32), shim_sig_arg!(libc::off64_t)];