From 618507eb8905129b8e53e19dd9b07b0b11c2249d Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sun, 18 Jun 2023 23:14:10 +0200 Subject: [PATCH] GDExtension: `Uninitialized*Ptr` for constructors/converters using placement new These methods construct their destination in-place, but the parameters are not declared using the `Uninitialized*Ptr` pointer types. --- core/extension/gdextension_interface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 3aa41f28daf..2a328c9a348 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -195,11 +195,11 @@ typedef struct { int32_t expected; } GDExtensionCallError; -typedef void (*GDExtensionVariantFromTypeConstructorFunc)(GDExtensionVariantPtr, GDExtensionTypePtr); -typedef void (*GDExtensionTypeFromVariantConstructorFunc)(GDExtensionTypePtr, GDExtensionVariantPtr); +typedef void (*GDExtensionVariantFromTypeConstructorFunc)(GDExtensionUninitializedVariantPtr, GDExtensionTypePtr); +typedef void (*GDExtensionTypeFromVariantConstructorFunc)(GDExtensionUninitializedTypePtr, GDExtensionVariantPtr); typedef void (*GDExtensionPtrOperatorEvaluator)(GDExtensionConstTypePtr p_left, GDExtensionConstTypePtr p_right, GDExtensionTypePtr r_result); typedef void (*GDExtensionPtrBuiltInMethod)(GDExtensionTypePtr p_base, const GDExtensionConstTypePtr *p_args, GDExtensionTypePtr r_return, int p_argument_count); -typedef void (*GDExtensionPtrConstructor)(GDExtensionTypePtr p_base, const GDExtensionConstTypePtr *p_args); +typedef void (*GDExtensionPtrConstructor)(GDExtensionUninitializedTypePtr p_base, const GDExtensionConstTypePtr *p_args); typedef void (*GDExtensionPtrDestructor)(GDExtensionTypePtr p_base); typedef void (*GDExtensionPtrSetter)(GDExtensionTypePtr p_base, GDExtensionConstTypePtr p_value); typedef void (*GDExtensionPtrGetter)(GDExtensionConstTypePtr p_base, GDExtensionTypePtr r_value);