Remove all traces of Box representation from bindings. Work around file read runtime problem.

This commit is contained in:
Josh Matthews 2014-03-14 12:55:57 -04:00 committed by Lars Bergstrom
parent bbac8aa5c3
commit f279abbf9f
8 changed files with 31 additions and 45 deletions

View file

@ -9,7 +9,6 @@ use layout_interface::TrustedNodeAddress;
use std::cast;
use std::cell::RefCell;
use std::raw::Box;
pub struct JS<T> {
priv ptr: RefCell<*mut T>
@ -50,13 +49,6 @@ impl<T: Reflectable> JS<T> {
}
pub unsafe fn from_box(box_: *mut Box<T>) -> JS<T> {
let raw: *mut T = &mut (*box_).data;
JS {
ptr: RefCell::new(raw)
}
}
pub unsafe fn from_trusted_node_address(inner: TrustedNodeAddress) -> JS<T> {
JS {
ptr: RefCell::new(inner as *mut T)