mri_sys/
lib.rs

1pub use self::consts::*;
2pub use self::value::*;
3pub use self::functions::*;
4pub use self::statics::*;
5pub use self::vt::*;
6pub use self::ty::*;
7
8mod value;
9mod vt;
10mod consts;
11mod statics;
12mod functions;
13mod ty;
14#[cfg(test)]
15mod test;
16#[cfg(feature = "helpers")] pub mod helpers;
17
18extern crate libc;
19
20#[repr(C)]
21#[derive(Copy,Clone,Debug,PartialEq,Eq)]
22pub struct ID(libc::uintptr_t);
23
24#[repr(C)]
25pub struct RBasic {
26    flags: VALUE,
27    klass: VALUE,
28}
29
30impl RBasic {
31    // Value is actually a pointer to an RBasic structure.
32    pub unsafe fn from_pointer(v: VALUE) -> *const Self {
33        let ptr: *const RBasic = std::mem::transmute(v);
34        ptr
35    }
36}
37