From 9d2d0712511b1cc015e99cd448a3c52663a1da36 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 5 Jul 2026 00:52:47 +0200 Subject: feat(engine-reflection): make cast_dyn_any fns take *mut pointers --- engine-reflection/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engine-reflection') diff --git a/engine-reflection/src/lib.rs b/engine-reflection/src/lib.rs index 3451442..ce770e9 100644 --- a/engine-reflection/src/lib.rs +++ b/engine-reflection/src/lib.rs @@ -3,7 +3,6 @@ use std::any::{type_name, Any, TypeId}; use std::borrow::Cow; use std::ffi::c_void; use std::fmt::Debug; -use std::ptr::NonNull; /// Trait implemented by types that support runtime reflection on them. /// @@ -91,7 +90,7 @@ impl Type } #[inline] - pub fn cast_dyn_any(&self, ptr: NonNull) -> Option> + pub fn cast_dyn_any(&self, ptr: *mut c_void) -> Option<*mut dyn Any> { match self { Self::Struct(struct_type) => Some((struct_type.cast_dyn_any)(ptr)), @@ -470,4 +469,4 @@ impl Debug for FnWithDebug type DefaultValueFn = fn() -> Box; -type CastDynAnyFn = fn(NonNull) -> NonNull; +type CastDynAnyFn = fn(*mut c_void) -> *mut dyn Any; -- cgit v1.2.3-18-g5258