summaryrefslogtreecommitdiff
path: root/engine-reflection/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-07-05 00:52:47 +0200
committerHampusM <hampus@hampusmat.com>2026-07-05 00:52:47 +0200
commit9d2d0712511b1cc015e99cd448a3c52663a1da36 (patch)
tree0f480f9185807b953f3bc4b5973e2c048bb2e470 /engine-reflection/src
parentd10552031890ec09937d1b7a0dea1e68b0daf79a (diff)
feat(engine-reflection): make cast_dyn_any fns take *mut pointers
Diffstat (limited to 'engine-reflection/src')
-rw-r--r--engine-reflection/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
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<c_void>) -> Option<NonNull<dyn Any>>
+ 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<Value: Debug> Debug for FnWithDebug<Value>
type DefaultValueFn = fn() -> Box<dyn Any>;
-type CastDynAnyFn = fn(NonNull<c_void>) -> NonNull<dyn Any>;
+type CastDynAnyFn = fn(*mut c_void) -> *mut dyn Any;