use libc; use std::mem; #[repr(C)] pub struct RubyArray { len: libc::size_t, data: *const libc::c_void, } impl RubyArray { #[allow(dead_code)] fn from_vec(vec: Vec) -> RubyArray { let array = RubyArray { data: vec.as_ptr() as *const libc::c_void, len: vec.len() as libc::size_t }; mem::forget(vec); array } }