Fix binding of function that takes Object * parameters.

pull/602/head
Fabio Alessandrelli 2021-09-25 01:39:30 +02:00 committed by Bastiaan Olij
parent b4632e317d
commit 42dd64f22f
1 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ MAKE_PTRARG_BY_REFERENCE(Variant);
template <class T> template <class T>
struct PtrToArg<T *> { struct PtrToArg<T *> {
_FORCE_INLINE_ static T *convert(const void *p_ptr) { _FORCE_INLINE_ static T *convert(const void *p_ptr) {
return reinterpret_cast<T *>(godot::internal::interface->object_get_instance_binding(p_ptr, godot::internal::token, T::___binding_callbacks)); return reinterpret_cast<T *>(godot::internal::interface->object_get_instance_binding((void *)p_ptr, godot::internal::token, &T::___binding_callbacks));
} }
typedef Object *EncodeT; typedef Object *EncodeT;
_FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) { _FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) {
@ -176,7 +176,7 @@ struct PtrToArg<T *> {
template <class T> template <class T>
struct PtrToArg<const T *> { struct PtrToArg<const T *> {
_FORCE_INLINE_ static const T *convert(const void *p_ptr) { _FORCE_INLINE_ static const T *convert(const void *p_ptr) {
return reinterpret_cast<const T *>(godot::internal::interface->object_get_instance_binding(p_ptr, godot::internal::token, T::___binding_callbacks)); return reinterpret_cast<const T *>(godot::internal::interface->object_get_instance_binding((void *)p_ptr, godot::internal::token, &T::___binding_callbacks));
} }
typedef const Object *EncodeT; typedef const Object *EncodeT;
_FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) { _FORCE_INLINE_ static void encode(T *p_var, void *p_ptr) {