summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/classes
diff options
context:
space:
mode:
Diffstat (limited to 'include/godot_cpp/classes')
-rw-r--r--include/godot_cpp/classes/ref.hpp8
1 files changed, 2 insertions, 6 deletions
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<Ref<T>> {
_FORCE_INLINE_ static Ref<T> convert(const void *p_ptr) {
// Important: p_ptr is T*, not Ref<T>*, since Object* is what engine gives to ptrcall.
ERR_FAIL_NULL_V(p_ptr, Ref<T>());
- return Ref<T>(reinterpret_cast<T *>(godot::internal::gdextension_interface_object_get_instance_binding(
- reinterpret_cast<GDExtensionObjectPtr>(const_cast<void *>(p_ptr)),
- godot::internal::token, &T::___binding_callbacks)));
+ return Ref<T>(reinterpret_cast<T *>(godot::internal::get_object_instance_binding(reinterpret_cast<GDExtensionObjectPtr>(const_cast<void *>(p_ptr)))));
}
typedef Ref<T> EncodeT;
@@ -267,9 +265,7 @@ struct PtrToArg<const Ref<T> &> {
_FORCE_INLINE_ static Ref<T> convert(const void *p_ptr) {
ERR_FAIL_NULL_V(p_ptr, Ref<T>());
- return Ref<T>(reinterpret_cast<T *>(godot::internal::gdextension_interface_object_get_instance_binding(
- reinterpret_cast<GDExtensionObjectPtr>(const_cast<void *>(p_ptr)),
- godot::internal::token, &T::___binding_callbacks)));
+ return Ref<T>(reinterpret_cast<T *>(godot::internal::get_object_instance_binding(reinterpret_cast<GDExtensionObjectPtr>(const_cast<void *>(p_ptr)))));
}
};