[−][src]Function mruby::ffi::from_user_data
pub unsafe fn from_user_data(mrb: *mut mrb_state) -> Result<Mrb, MrbError>
Extract an Mrb
interpreter from the userdata pointer on a
sys::mrb_state
.
This function is unsafe! It manipulates a raw pointer stored as a
c_void
on mrb->ud
. from_user_data
assumes that
this c_void
was created with Rc::into_raw
, see
calling this function, Rc::strong_count
on the Mrb
instance will
increase by one.