More fix to use vtable for component. All rust code compiles

This commit is contained in:
Olivier Goffart 2020-05-15 08:16:49 +02:00
parent 686f4c9591
commit 4988fcb543
6 changed files with 80 additions and 39 deletions

View file

@ -176,9 +176,8 @@ pub fn sixtyfps(stream: TokenStream) -> TokenStream {
});
sixtyfps_runtime_run_component_with_gl_renderer(
// FIMXE!!! this does not compile
unsafe { VRefMut::from_inner(
core::ptr::NonNull::new_unchecked(&*COMPONENT_VTABLE as *mut ComponentVTable),
unsafe { VRefMut::from_raw(
core::ptr::NonNull::from(&*COMPONENT_VTABLE),
core::ptr::NonNull::from(self).cast()
)}
);