From 817efdd4845ed1a0024804c23c43bfb98d144fc4 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 14 Mar 2022 18:35:52 +0200 Subject: [PATCH] Fix build after "Discern between VIRTUAL and ABSTRACT class bindings". --- godot-headers/godot/gdnative_interface.h | 2 ++ include/godot_cpp/core/class_db.hpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/godot-headers/godot/gdnative_interface.h b/godot-headers/godot/gdnative_interface.h index 62934d1..76e87ea 100644 --- a/godot-headers/godot/gdnative_interface.h +++ b/godot-headers/godot/gdnative_interface.h @@ -194,6 +194,7 @@ typedef void *GDExtensionClassInstancePtr; typedef GDNativeBool (*GDNativeExtensionClassSet)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value); typedef GDNativeBool (*GDNativeExtensionClassGet)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); +typedef uint64_t (*GDNativeExtensionClassGetRID)(GDExtensionClassInstancePtr p_instance); typedef struct { uint32_t type; @@ -228,6 +229,7 @@ typedef struct { GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */ GDNativeExtensionClassFreeInstance free_instance_func; /* this one is mandatory */ GDNativeExtensionClassGetVirtual get_virtual_func; + GDNativeExtensionClassGetRID get_rid_func; void *class_userdata; } GDNativeExtensionClassCreationInfo; diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 92d42df..2034c27 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -155,10 +155,11 @@ void ClassDB::register_class() { nullptr, // GDNativeExtensionClassNotification notification_func; nullptr, // GDNativeExtensionClassToString to_string_func; nullptr, // GDNativeExtensionClassReference reference_func; - nullptr, // GDNativeExtensionClassUnreference + nullptr, // GDNativeExtensionClassUnreference unreference_func; T::create, // GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */ T::free, // GDNativeExtensionClassFreeInstance free_instance_func; /* this one is mandatory */ &ClassDB::get_virtual_func, // GDNativeExtensionClassGetVirtual get_virtual_func; + nullptr, // GDNativeExtensionClassGetRID get_rid; (void *)cl.name, // void *class_userdata; };