Merge pull request #724 from bruvzg/fix-after-expose-more-gdextension

pull/726/head
Rémi Verschelde 2022-03-16 10:39:40 +01:00 committed by GitHub
commit 7bcf579a37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -194,6 +194,7 @@ typedef void *GDExtensionClassInstancePtr;
typedef GDNativeBool (*GDNativeExtensionClassSet)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value); 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 GDNativeBool (*GDNativeExtensionClassGet)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret);
typedef uint64_t (*GDNativeExtensionClassGetRID)(GDExtensionClassInstancePtr p_instance);
typedef struct { typedef struct {
uint32_t type; uint32_t type;
@ -228,6 +229,7 @@ typedef struct {
GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */ GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */
GDNativeExtensionClassFreeInstance free_instance_func; /* this one is mandatory */ GDNativeExtensionClassFreeInstance free_instance_func; /* this one is mandatory */
GDNativeExtensionClassGetVirtual get_virtual_func; GDNativeExtensionClassGetVirtual get_virtual_func;
GDNativeExtensionClassGetRID get_rid_func;
void *class_userdata; void *class_userdata;
} GDNativeExtensionClassCreationInfo; } GDNativeExtensionClassCreationInfo;

View File

@ -155,10 +155,11 @@ void ClassDB::register_class() {
nullptr, // GDNativeExtensionClassNotification notification_func; nullptr, // GDNativeExtensionClassNotification notification_func;
nullptr, // GDNativeExtensionClassToString to_string_func; nullptr, // GDNativeExtensionClassToString to_string_func;
nullptr, // GDNativeExtensionClassReference reference_func; nullptr, // GDNativeExtensionClassReference reference_func;
nullptr, // GDNativeExtensionClassUnreference nullptr, // GDNativeExtensionClassUnreference unreference_func;
T::create, // GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */ T::create, // GDNativeExtensionClassCreateInstance create_instance_func; /* this one is mandatory */
T::free, // GDNativeExtensionClassFreeInstance free_instance_func; /* this one is mandatory */ T::free, // GDNativeExtensionClassFreeInstance free_instance_func; /* this one is mandatory */
&ClassDB::get_virtual_func, // GDNativeExtensionClassGetVirtual get_virtual_func; &ClassDB::get_virtual_func, // GDNativeExtensionClassGetVirtual get_virtual_func;
nullptr, // GDNativeExtensionClassGetRID get_rid;
(void *)cl.name, // void *class_userdata; (void *)cl.name, // void *class_userdata;
}; };