From 431e30bc3273c83315725f56365845f0b89c0524 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Fri, 17 Feb 2023 10:49:09 -0600 Subject: Ensure GDExtension class is the correct type for the Godot engine class --- include/godot_cpp/classes/ref.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include/godot_cpp/classes/ref.hpp') diff --git a/include/godot_cpp/classes/ref.hpp b/include/godot_cpp/classes/ref.hpp index 301f847..5c10e59 100644 --- a/include/godot_cpp/classes/ref.hpp +++ b/include/godot_cpp/classes/ref.hpp @@ -242,9 +242,7 @@ struct PtrToArg> { _FORCE_INLINE_ static Ref convert(const void *p_ptr) { // Important: p_ptr is T*, not Ref*, since Object* is what engine gives to ptrcall. ERR_FAIL_NULL_V(p_ptr, Ref()); - return Ref(reinterpret_cast(godot::internal::gdextension_interface_object_get_instance_binding( - reinterpret_cast(const_cast(p_ptr)), - godot::internal::token, &T::___binding_callbacks))); + return Ref(reinterpret_cast(godot::internal::get_object_instance_binding(reinterpret_cast(const_cast(p_ptr))))); } typedef Ref EncodeT; @@ -267,9 +265,7 @@ struct PtrToArg &> { _FORCE_INLINE_ static Ref convert(const void *p_ptr) { ERR_FAIL_NULL_V(p_ptr, Ref()); - return Ref(reinterpret_cast(godot::internal::gdextension_interface_object_get_instance_binding( - reinterpret_cast(const_cast(p_ptr)), - godot::internal::token, &T::___binding_callbacks))); + return Ref(reinterpret_cast(godot::internal::get_object_instance_binding(reinterpret_cast(const_cast(p_ptr))))); } }; -- cgit v1.2.3