logo
macro_rules! mrb_get_args {
    ($mrb:expr, none) => { ... };
    ($mrb:expr, required = 1) => { ... };
    ($mrb:expr, optional = 1) => { ... };
    ($mrb:expr, required = 1, optional = 1) => { ... };
    ($mrb:expr, required = 1, optional = 2) => { ... };
    ($mrb:expr, required = 1, &block) => { ... };
    ($mrb:expr, required = 1, optional = 1, &block) => { ... };
    ($mrb:expr, required = 2) => { ... };
    ($mrb:expr, optional = 2) => { ... };
    ($mrb:expr, optional = 2, &block) => { ... };
    ($mrb:expr, required = 2, optional = 1) => { ... };
    ($mrb:expr, *args) => { ... };
}
Expand description

Extract sys::mrb_values from a sys::mrb_state to adapt a C entry point to a Rust implementation of a Ruby function.

This macro exists because the mruby VM does not validate argspecs attached to native functions.

This macro calls unsafe functions.