diff --git a/src/internal/js/class.rs b/src/internal/js/class.rs index 43480ae14..870b3e28b 100644 --- a/src/internal/js/class.rs +++ b/src/internal/js/class.rs @@ -252,7 +252,7 @@ pub trait ClassInternal: Class { let (call_callback, call_kernel) = match descriptor.call { Some(k) => k.export(), - None => (mem::transmute(ConstructorCallKernel::unimplemented::), null_mut()) + None => (mem::transmute(ConstructorCallKernel::unimplemented:: as usize), null_mut()) }; let metadata_pointer = neon_sys::class::create_base(isolate, diff --git a/src/internal/vm.rs b/src/internal/vm.rs index fd4da89fb..7ac51a72f 100644 --- a/src/internal/vm.rs +++ b/src/internal/vm.rs @@ -62,7 +62,7 @@ impl IsolateInternal for Isolate { let b: Box = Box::new(ClassMap::new()); let raw = Box::into_raw(b); ptr = unsafe { mem::transmute(raw) }; - let free_map: *mut c_void = unsafe { mem::transmute(drop_class_map) }; + let free_map: *mut c_void = unsafe { mem::transmute(drop_class_map as usize) }; unsafe { neon_sys::class::set_class_map(self.to_raw(), ptr, free_map); } @@ -176,7 +176,7 @@ impl<'a> Module<'a> { let mut scope = RootScope::new(unsafe { mem::transmute(neon_sys::object::get_isolate(exports.to_raw())) }); unsafe { let kernel: *mut c_void = mem::transmute(init); - let callback: extern "C" fn(*mut c_void, *mut c_void, *mut c_void) = mem::transmute(module_callback); + let callback: extern "C" fn(*mut c_void, *mut c_void, *mut c_void) = mem::transmute(module_callback as usize); let exports: raw::Local = exports.to_raw(); let scope: *mut c_void = mem::transmute(&mut scope); neon_sys::module::exec_kernel(kernel, callback, exports, scope); @@ -270,7 +270,7 @@ pub trait Kernel: Sized { /// and the kernel function, both converted to raw void pointers. fn export(self) -> (*mut c_void, *mut c_void) { unsafe { - (mem::transmute(Self::callback), self.as_ptr()) + (mem::transmute(Self::callback as usize), self.as_ptr()) } } }